15 #include <DAQChannelMap/DAQChannelMap.h> 16 #include <NovaDAQConventions/DAQConventions.h> 83 _miprate(0.), _ngooddb(0), _numslc(0.), _trkfrac(0.)
116 , _barcode (UINT_MAX)
119 , _voltage (UINT_MAX)
124 _pixelGain.resize(32, 100.);
142 {
return _sn == apdi.
_sn; }
145 {
return _sn != apdi.
_sn; }
149 o <<
"APD: " << apdi.
_sn <<
" " 175 {
return _sn == febi.
_sn; }
178 {
return _sn != febi.
_sn; }
210 if ( _diblock < hl.
_diblock )
return true;
212 _dcm < hl.
_dcm )
return true;
215 _feb < hl.
_feb )
return true;
297 DiBlock(
unsigned int ndcm=12) {
dcm.resize(ndcm); nInstrumentedFEBs=0;
300 dcm.resize(ndcm); nInstrumentedFEBs=0;
num=dbnum;
301 for (
unsigned int i=0;
i<ndcm; ++
i) {
303 dcm[
i].diblock=dbnum;
332 void SetRunNumber(
int run);
336 bool LoadDAQRunHistory();
337 bool LoadHardwareInfo();
338 bool LoadDCSAlarms(
int subrun=-1);
339 bool LoadCoolingInfo();
340 bool LoadPixelInfo(
int nAttempt=0);
341 bool LoadPixelMasks();
343 bool LoadFEBMasksFromDAQDB();
344 bool LoadPedestals();
345 bool LoadAPDSettings();
347 bool LoadGoodDiBlockMask();
348 bool LoadDataEpoch();
350 LoadHardwareInfo() &&
352 LoadAPDSettings()); };
371 int ApplyAnalysisDiBlockMask(
const int mask)
const;
372 std::string DiBlockMaskToString(
const int mask)
const;
375 int NSubruns() { LoadDAQRunHistory();
return _nsubrun; }
378 int Partition() { LoadDAQRunHistory();
return _partition;}
386 time_t SubrunTStart(
int isr);
387 time_t SubrunTStop(
int isr);
389 int Duration() { LoadDAQRunHistory();
return TStop()-TStart(); }
390 int NTriggers() { LoadDAQRunHistory();
return _nTotTrig; }
391 float NPOT() { LoadPOT();
return _npot; }
394 int NDiBlocks() { LoadDAQRunHistory();
return _dbList.size(); }
397 int NBNEVBs() { LoadDAQRunHistory();
return _bnevbList.size(); }
400 int NAnalysisChannels(
int sr=0);
401 int NAnalysisDiBlocks(
int sr=0);
404 int NFEBs() { LoadPixelInfo();
return _nTotalFEBs; }
406 int GoodDiBlockMask(
int subrun=-1,
bool reload=
false);
407 int GetConfiguration();
408 void SetGoodDiBlockMask(
int newmask) {
for (
size_t isr=0; isr<64; ++isr) _subrunList[isr].goodDiBlockMask=newmask; _gotGoodDiBlockMask=
true;}
409 bool IsGoodDiBlock(
int idb,
int subrun=-1);
411 DiBlock GetDiBlock(
int i,
bool loadAll=
true);
415 bool IsDiBlockFullyInstrumented(
int idb);
446 std::vector<DQSubrunInfo> GetDQSubrunInfo();
462 void PrintChanInfo();
472 int DetGainSetting();
476 bool DetFineTimingSetting()
const;
492 void InvalidateCaches();
496 std::map<uint32_t, APDInfo> PullAPDInfoFromDB();
497 std::map<HardwareLocation, std::pair<FEBInfo, APDInfo>> PullFEBInfoFromDB(std::map<uint32_t, APDInfo> apdinfomap);
498 void MapHardwareToLocation();
557 std::map<geo::OfflineChan,std::vector<BadChan_t> >
_badChan;
558 std::map<geo::OfflineChan,std::vector<ChanInfo_t> >
_chanInfo;
void SetTimeQueries(bool f)
bool operator!=(const FEBInfo &febi) const
std::vector< DQSubrunInfo > _dqSRInfo
int NDiBlocks()
gives number of active diblocks only, may be less than 14
float _intercept
intercept for voltage setting
diblock
print "ROW IS " print row
void SetBadChanVersion(std::string v)
uint32_t _layerPos
position in the layer
void SetAbort(bool abort)
bool operator<(const HardwareLocation &hl) const
uint32_t _modcon
module connection id
std::vector< float > _pixelGain
pixel gain map for APD
void SetGetDiBlockMaskFromCondb(bool f)
void SetIfCustomMasking(bool f)
set from fcl: do we want to use a custom mask?
std::string BadChanVersion()
bool operator!=(const HardwareLocation &hl) const
bool operator==(const FEBInfo &febi) const
bool gotNAnalysisChannels
std::vector< BNEVB > _bnevbList
bool operator!=(const APDInfo &apdi) const
uint32_t _diblock
Diblock.
uint32_t _batch
APD batch number.
std::vector< int16_t > pixelThresh
std::vector< float > pixelGain
each entry is the gain for the pixel with the number of the index
void SetAbortIfMissingRunInDB(bool abort)
std::string TStopAsString()
bool _analysisDiBlockMasking
::xsd::cxx::tree::duration< char, simple_type > duration
bool operator==(const APDInfo &apdi) const
bool _abortIfMissingRunInDB
uint32_t _modcon
module connection id
std::string _badChanVersion
bool SortDiBlocks(RunHistory::DiBlock db1, RunHistory::DiBlock db2)
uint32_t _layer
layer in the block
std::map< int, int > _diblockIndex
float _slope
slope for voltage setting
uint32_t _module
module APD is connected to
std::vector< int > _nEvtTrig
std::vector< DiBlock > _dbList
std::vector< BNEVB > GetBNEVBList()
void SetDataType(nova::dbi::DataType dt)
std::string GainSettingTag()
int Duration()
in units of seconds
bool gotNAnalysisDiBlocks
void SetGainSettingTag(std::string tag)
nova::dbi::DataType _dataType
void SetCustomMask(std::vector< bool > f)
set from fcl: what is our custom mask?
void SetNDRHCRunStart(std::vector< int > r)
void SetCurrentSubrun(int isr)
void SetNRetryLoads(int n)
Hold drift constants from current run.
void SetNDRHCRunStop(std::vector< int > r)
uint32_t _module
module FEB is connected to
std::vector< int > _fdRHCRunStart
bool hasAPD
true if instrumented and active in run, and not masked
void SetSubrunDiBlockMask(int isr, int m)
bool operator<(const FEBInfo &febi) const
void SetDiBlockMaskTag(std::string s)
void SetTimeParsing(bool f)
std::map< geo::OfflineChan, std::vector< BadChan_t > > _badChan
int CurrentSubrun() const
std::vector< int > _fdRHCRunStop
bool operator<(const APDInfo &apdi) const
std::vector< Subrun > _subrunList
bool operator==(const HardwareLocation &hl) const
uint32_t _block
installed block
void SetFDRHCRunStop(std::vector< int > r)
std::vector< int > _ndRHCRunStart
std::vector< int > _ndRHCRunStop
int32_t _temp
operating temperature
std::ostream & operator<<(std::ostream &stream, const Column &col)
std::map< geo::OfflineChan, std::vector< ChanInfo_t > > _chanInfo
bool GetDiBlockMaskFromCondb() const
void SetGoodDiBlockMask(int newmask)
uint32_t _barcode
barcoded_item_id from barcoded_item table
nova::dbi::DataType GetDataType()
bool _getDiBlockMaskFromCondb
uint32_t dchan
< DAQ Channel Map Package
int nInstrumentedFEBs
number of FEBs that were instrumented and active in run and not masked
int nInstrumentedFEBs
number of FEBs that were intrumented and active in run and not masked
void SetFDRHCRunStart(std::vector< int > r)
DiBlock(unsigned int ndcm=12)
float _voltage
operating voltage
uint32_t _barcode
barcode id from barcoded_item table
Simple object representing a (plane, cell) pair.
void SetAnalysisDiBlockMasking(bool f)
set from fcl: do we want to use the analysis rules when we mask (not for custom masking)?
std::string TStartAsString()
DiBlock(int dbnum, unsigned int ndcm=12)
int32_t _detid
Detector ID.
std::string Detector() const
void SetIfAnyMasking(bool f)
set from fcl: do we want to use any masking at all? If no, other masking options irrelevant ...