SND@LHC Software
Loading...
Searching...
No Matches
convertRawData.py
Go to the documentation of this file.
1#!/usr/bin/env python
2import ROOT,os,sys
3ROOT.gSystem.Load("libXrdCl")
4import ConvRawData
5import SndlhcGeo
6
7import rootUtils as ut
8h={}
9
10from argparse import ArgumentParser
11parser = ArgumentParser()
12parser.add_argument("-r", "--runNumber", dest="runNumber", help="run number", type=int,required=True)
13parser.add_argument("-P", "--partition", dest="partition", help="partition of data", type=int,required=False,default=-1)
14parser.add_argument("-p", "--path", dest="path", help="path to raw data", default='/mnt/hgfs/VMgate/')
15parser.add_argument("-M", "--online", dest="online", help="online mode",default=False,action='store_true')
16parser.add_argument("-n", "--nEvents", dest="nEvents", help="number of events to process", type=int,default=-1)
17parser.add_argument("-t", "--nStart", dest="nStart", help="first event to process", type=int,default=0)
18parser.add_argument("-d", "--Debug", dest="debug", help="debug", default=False)
19parser.add_argument("-s",dest="stop", help="do not start running", default=False)
20parser.add_argument("-zM",dest="minMuHits", help="noise suppresion min MuFi hits", default=-1, type=int)
21parser.add_argument("-zS",dest="minScifiHits", help="noise suppresion min ScifFi hits", default=-1, type=int)
22parser.add_argument("-b", "--heartBeat", dest="heartBeat", help="heart beat", type=int,default=100000)
23parser.add_argument("-cpp", "--convRawCPP", action='store_true', dest="FairTask_convRaw", help="convert raw data using ConvRawData FairTask", default=False)
24parser.add_argument( "--withCalibration", action='store_true', dest="makeCalibration", help="make QDC and TDC calibration, not taking from raw data", default=False)
25parser.add_argument("-g", "--geoFile", dest="geoFile", help="geofile",default=None)
26parser.add_argument("--server", dest="server", help="xrootd server",default=os.environ["EOSSHIP"])
27parser.add_argument("-A", "--auto", dest="auto", help="run in auto mode online monitoring",default=False,action='store_true')
28
29options = parser.parse_args()
30options.chi2Max = 2000.
31options.saturationLimit = 0.95
32
33# setup geometry
34if (options.geoFile):
35 options.withGeoFile = True
36 if (options.geoFile).find('../')<0: snd_geo = SndlhcGeo.GeoInterface(options.geoFile)
37 else: snd_geo = SndlhcGeo.GeoInterface(options.geoFile[3:])
38else : options.withGeoFile = False
39
41converter.Init(options)
42converter.Run()
43converter.Finalize()
44
45