Ejemplo n.º 1
0
if __name__ == '__main__':

    # Set logging options
    logging.config.fileConfig(logConfigFile)
    logger = logging.getLogger('full')
    logger.info('Started')

    # Determine the time and date of the last entry in the School's elogbook
    lastEntryPerSchool = read_schools_elog(elogCsvFile)

    # Find directory for the last daily dqmreport
    lastDqmreport, schoolsDqmreportList = \
        read_dqmreport(EEE_ACTIVE_STATIONS, pathDqmreport)

    # Read the pickle file with Transfer RUN info from the database
    transferData = read_pickle(pathWorkDir, pklTransferFile)
    logger.info("pickle file extracted from the"
                "database imported: transferData is loaded")

    # Read the pickle file with DQM RUN info from the database
    dqmData = read_pickle(pathWorkDir, pklDqmFile)
    logger.info("pickle file extracted from the"
                "database imported: dqmData is loaded")

    # Combine data into E3Monitor class and write pickle file
    write_monitor_data(lastEntryPerSchool, lastDqmreport, schoolsDqmreportList,
                       transferData, dqmData, EEE_EXCLUDED_STATIONS)

    # Final log message
    logger.info('Finished')
Ejemplo n.º 2
0
    locale.setlocale(locale.LC_ALL, 'it_IT')

    # Determine the time and date of the last entry in the School's elogbook
    lastEntryPerSchool = read_schools_elog(elogCsvFile)

    # Determine the content of DQM .summary files for each school
    # and the list of schools that actually have a DQM directory
    # runSchoolsSummary, schoolsDqmList = \
    #    read_dqm_summary(EEE_ACTIVE_STATIONS, pathDqm)

    # Find directory for the last daily dqmreport
    lastDqmreport, schoolsDqmreportList = \
        read_dqmreport(EEE_ACTIVE_STATIONS, pathDqmreport)

    # Read the pickle file with Transfer RUN info from the database
    transferData = read_pickle(pathWorkDir, pklTransferFile)
    logger.info("pickle file extracted from the"
                "database imported: transferData is loaded")

    # Read the pickle file with DQM RUN info from the database
    dqmData = read_pickle(pathWorkDir, pklDqmFile)
    logger.info("pickle file extracted from the"
                "database imported: dqmData is loaded")

    # Make the HTML main page index.html
    make_main_page(lastEntryPerSchool, lastDqmreport, schoolsDqmreportList,
                   dqmData, EEE_ACTIVE_STATIONS)

    # Final log message
    logger.info('Finished')
Ejemplo n.º 3
0
dateRun0Start = md.date2num(datetime(2014,10,27))
dateRun0End = md.date2num(datetime(2014,11,14))
dateRun1Start = md.date2num(datetime(2015,2,27))
dateRun1End = md.date2num(datetime(2015,4,30))
dateRun2Start = md.date2num(datetime(2015,11,7))
dateRun2End = md.date2num(datetime(2016,5,20))
dateRun3Start = md.date2num(datetime(2016,11,1))
dateRun3End = md.date2num(datetime(2017,5,31))
dateRun4Start = md.date2num(datetime(2017,10,2))
dateRun4End = md.date2num(datetime(2018,5,30))
dateRun5Start = md.date2num(datetime(2018,10,15))
dateRun5End = md.date2num(datetime(2019,5,31))
dateRunToday = md.date2num(datetime.today())

# Read pickle
trackStat = read_pickle(pathWorkDir, pklStatFile)
logger.info("pickle file extracted from the"
            "database imported: track data is loaded")

#
# Make the plot
#
logger.info("Let's make the plot...")
# First make two list with ordered values
for _dates, _ntracks in sorted(trackStat.items()):
    dates.append(datetime.strptime(_dates, '%Y-%m-%d'))
    ntracks.append(_ntracks)

# Set xlabel every interval months
months = MonthLocator(range(1, 13), bymonthday=1, interval=2)
monthsFmt = DateFormatter("%d %b %Y")
Ejemplo n.º 4
0
from e3monitor.tasks.read_pickle import read_pickle
from e3monitor.tasks.make_shift_report_xlsx import make_shift_report_xlsx
from e3monitor.config.__stations__ import EEE_ACTIVE_STATIONS
from e3monitor.config.__files_server__ import (logConfigFile,
                                               pathWorkDir,
                                               pklMonitorFile,
                                               xlsxFile)

if __name__ == '__main__':

    # Set logging options
    logging.config.fileConfig(logConfigFile)
    logger = logging.getLogger('full')
    logger.info('Started')

    # Set locale to Italian
    locale.setlocale(locale.LC_ALL, 'it_IT.UTF-8')

    # Read the E3Monitor data
    monitorData = read_pickle(pathWorkDir, pklMonitorFile)
    logger.info("pickle file extracted from the "
                "database imported: E3Monitor class is loaded "
                "as monitorData")

    make_shift_report_xlsx(monitorData,
                           EEE_ACTIVE_STATIONS,
                           xlsxFile)

    # Final log message
    logger.info('Finished')
Ejemplo n.º 5
0
    logging.config.fileConfig(logConfigFile)
    logger = logging.getLogger('full')
    logger.info('Started')

    # Set locale to Italian
    locale.setlocale(locale.LC_ALL, 'it_IT')

    # Determine the time and date of the last entry in the School's elogbook
    lastEntryPerSchool = read_schools_elog(elogCsvFile)

    # Determine the content of DQM .summary files for each school
    # and the list of schools that actually have a DQM directory
    # runSchoolsSummary, schoolsDqmList = \
    #    read_dqm_summary(EEE_ACTIVE_STATIONS, pathDqm)

    # Find directory for the last daily dqmreport
    lastDqmreport, schoolsDqmreportList = \
        read_dqmreport(EEE_ACTIVE_STATIONS, pathDqmreport)

    # Read the pickle file with RUN info from the database
    dqmData = read_pickle(pathWorkDir, pklDqmFile)
    logger.info("pickle file extracted from the"
                "database imported: dqmData is loaded")

    # Make the HTML main page index.html
    make_xlsx_file(lastEntryPerSchool, lastDqmreport, schoolsDqmreportList,
                   dqmData, EEE_ACTIVE_STATIONS)

    # Final log message
    logger.info('Finished')
Ejemplo n.º 6
0
from e3monitor.tasks.read_pickle import read_pickle
from e3monitor.tasks.make_webpage_index2 import make_webpage_index2
from e3monitor.config.__stations__ import EEE_ACTIVE_STATIONS
from e3monitor.config.__files_server__ import (logConfigFile,
                                               pathWorkDir,
                                               pklMonitorFile,
                                               mainWebPageFile2)

if __name__ == '__main__':

    # Set logging options
    logging.config.fileConfig(logConfigFile)
    logger = logging.getLogger('full')
    logger.info('Started')

    # Set locale to Italian
    locale.setlocale(locale.LC_ALL, 'it_IT')

    # Read the E3Monitor data
    monitorData = read_pickle(pathWorkDir, pklMonitorFile)
    logger.info("pickle file extracted from the "
                "database imported: E3Monitor class is loaded "
                "as monitorData")

    make_webpage_index2(monitorData,
                        EEE_ACTIVE_STATIONS,
                        mainWebPageFile2)

    # Final log message
    logger.info('Finished')
Ejemplo n.º 7
0
                                               pklReportFile,
                                               pklTracksFile,
                                               htmlReportFile)

if __name__ == '__main__':

    # Set logging options
    logging.config.fileConfig(logConfigFile)
    logger = logging.getLogger('full')
    logger.info('Started')

    # Set locale to Italian
    locale.setlocale(locale.LC_ALL, 'it_IT.UTF-8')

    # Read the class E3Report data
    reportData = read_pickle(pathWorkDir, pklReportFile)
    logger.info("pickle file read: E3Report class is loaded "
                "as reportData")

    # Read the totalTracks
    totalTracks = read_pickle(pathWorkDir, pklTracksFile)
    logger.info("totalTracks number read")

    report_write(reportData,
                 totalTracks,
                 EEE_ACTIVE_STATIONS,
                 pathWorkDir,
                 htmlReportFile)

    # Final log message
    logger.info('Finished')
Ejemplo n.º 8
0
    logging.config.fileConfig(logConfigFile)
    logger = logging.getLogger('full')
    logger.info('Started')

    # Set locale to Italian
    locale.setlocale(locale.LC_ALL, 'it_IT')

    # Determine the time and date of the last entry in the School's elogbook
    lastEntryPerSchool = read_schools_elog(elogCsvFile)

    # Determine the content of DQM .summary files for each school
    # and the list of schools that actually have a DQM directory
    # runSchoolsSummary, schoolsDqmList = \
    #    read_dqm_summary(EEE_ACTIVE_STATIONS, pathDqm)

    # Find directory for the last daily dqmreport
    lastDqmreport, schoolsDqmreportList = \
        read_dqmreport(EEE_ACTIVE_STATIONS, pathDqmreport)

    # Read the pickle file with RUN info from the database
    dqmData = read_pickle(pathWorkDir, pklDqmFile)
    logger.info("pickle file extracted from the"
                "database imported: dqmData is loaded")

    # Make the HTML main page index.html
    make_xlsx_file(lastEntryPerSchool, lastDqmreport, schoolsDqmreportList,
                   dqmData, EEE_ACTIVE_STATIONS)

    # Final log message
    logger.info('Finished')
Ejemplo n.º 9
0
                                               pklStatFile,
                                               pathWorkDir,
                                               logConfigFile)

# Define dictionary for track statistics
trackStat = {}
dates = []
ntracks = []

# Set logging
logging.config.fileConfig(logConfigFile)
logger = logging.getLogger('full')
logger.info('Started: Make plot for Statistics')

# Read pickle
trackStat = read_pickle(pathWorkDir, pklStatFile)
logger.info("pickle file extracted from the"
            "database imported: track data is loaded")

#
# Make the plot
#
logger.info("Let's make the plot...")
# First make two list with ordered values
for _dates, _ntracks in sorted(trackStat.items()):
    dates.append(datetime.strptime(_dates, '%Y-%m-%d'))
    ntracks.append(_ntracks)

# Set xlabel every interval months
months = MonthLocator(range(1, 13), bymonthday=1, interval=1)
monthsFmt = DateFormatter("%d %b %Y")
Ejemplo n.º 10
0
                                               pklTracksFile,
                                               mainWebPageFile,
                                               ibWebPageFile)

if __name__ == '__main__':

    # Set logging options
    logging.config.fileConfig(logConfigFile)
    logger = logging.getLogger('full')
    logger.info('Started')

    # Set locale to Italian
    locale.setlocale(locale.LC_ALL, 'it_IT.UTF-8')

    # Read the E3Monitor data
    monitorData = read_pickle(pathWorkDir, pklMonitorFile)
    logger.info("pickle file extracted from the "
                "database imported: E3Monitor class is loaded "
                "as monitorData")

    # Read the totalTracks
    totalTracks = read_pickle(pathWorkDir, pklTracksFile)
    logger.info("totalTracks number read")

    make_webpage_index(monitorData,
                       totalTracks,
                       EEE_ACTIVE_STATIONS,
                       mainWebPageFile)

    make_webpage_ib(monitorData,
                    totalTracks,
Ejemplo n.º 11
0
from e3monitor.tasks.read_pickle import read_pickle
from e3monitor.tasks.report_write import report_write
from e3monitor.config.__stations__ import EEE_ACTIVE_STATIONS
from e3monitor.config.__files_server__ import (logConfigFile, pathWorkDir,
                                               pklReportFile, pklTracksFile,
                                               htmlReportFile)

if __name__ == '__main__':

    # Set logging options
    logging.config.fileConfig(logConfigFile)
    logger = logging.getLogger('full')
    logger.info('Started')

    # Set locale to Italian
    locale.setlocale(locale.LC_ALL, 'it_IT')

    # Read the class E3Report data
    reportData = read_pickle(pathWorkDir, pklReportFile)
    logger.info("pickle file read: E3Report class is loaded " "as reportData")

    # Read the totalTracks
    totalTracks = read_pickle(pathWorkDir, pklTracksFile)
    logger.info("totalTracks number read")

    report_write(reportData, totalTracks, EEE_ACTIVE_STATIONS, pathWorkDir,
                 htmlReportFile)

    # Final log message
    logger.info('Finished')