21 #include "boost/bind.hpp"
83 TString varvalue =
"";
94 Int_t ts_chan_num_to_plane = 0;
95 Int_t ts_chan_type_to_element = 0;
118 Bool_t local_debug =
false;
119 Int_t reference_counter = 0;
128 while (mapstr.ReadNextLine())
130 mapstr.TrimComment(
'!');
131 mapstr.TrimWhitespace();
132 if (mapstr.LineIsEmpty())
continue;
134 if (mapstr.HasVariablePair(
"=",varname,varvalue))
143 else if (varname==
"qdc_bank")
148 else if (varname==
"sca_bank")
153 else if (varname==
"f1tdc_bank")
158 else if (varname==
"slot")
167 modtype = mapstr.GetTypedNextToken<TString>();
168 modnum = mapstr.GetTypedNextToken<Int_t>();
169 channum = mapstr.GetTypedNextToken<Int_t>();
170 dettype = mapstr.GetTypedNextToken<TString>();
171 name = mapstr.GetTypedNextToken<TString>();
173 if (local_debug) printf(
"%8s, %d, %d %s, %s\n", modtype.Data(), modnum, channum, dettype.Data(), name.Data());
176 if (modtype==
"SIS3801") {
179 localchannel.SetNeedsExternalClock(kFALSE);
180 fSCAs.push_back(localchannel);
182 fSCAs_offset.push_back(QwSIS3801D24_Channel::GetBufferOffset(modnum,channum));
190 else if (modtype==
"V792" ) {
212 else if( modtype==
"F1TDC") {
227 if (name==
"md_reftime_f1") {
238 package = kPackageNull;
245 if (name==
"md1m_f1") {
246 ts_chan_num_to_plane = 1;
247 ts_chan_type_to_element = 2;
250 else if (name==
"md2m_f1") {
251 ts_chan_num_to_plane = 2;
252 ts_chan_type_to_element = 2;
255 else if (name==
"md3m_f1") {
256 ts_chan_num_to_plane = 3;
257 ts_chan_type_to_element = 2;
260 else if (name==
"md4m_f1") {
261 ts_chan_num_to_plane = 4;
262 ts_chan_type_to_element = 2;
265 else if (name==
"md5m_f1") {
266 ts_chan_num_to_plane = 5;
267 ts_chan_type_to_element = 2;
270 else if (name==
"md6m_f1") {
271 ts_chan_num_to_plane = 6;
272 ts_chan_type_to_element = 2;
275 else if (name==
"md7m_f1") {
276 ts_chan_num_to_plane = 7;
277 ts_chan_type_to_element = 2;
280 else if (name==
"md8m_f1") {
281 ts_chan_num_to_plane = 8;
282 ts_chan_type_to_element = 2;
285 else if (name==
"md1p_f1") {
286 ts_chan_num_to_plane = 1;
287 ts_chan_type_to_element = 1;
290 else if (name==
"md2p_f1") {
291 ts_chan_num_to_plane = 2;
292 ts_chan_type_to_element = 1;
295 else if (name==
"md3p_f1") {
296 ts_chan_num_to_plane = 3;
297 ts_chan_type_to_element = 1;
300 else if (name==
"md4p_f1") {
301 ts_chan_num_to_plane = 4;
302 ts_chan_type_to_element = 1;
305 else if (name==
"md5p_f1") {
306 ts_chan_num_to_plane = 5;
307 ts_chan_type_to_element = 1;
310 else if (name==
"md6p_f1") {
311 ts_chan_num_to_plane = 6;
312 ts_chan_type_to_element = 1;
315 else if (name==
"md7p_f1") {
316 ts_chan_num_to_plane = 7;
317 ts_chan_type_to_element = 1;
320 else if (name==
"md8p_f1") {
321 ts_chan_num_to_plane = 8;
322 ts_chan_type_to_element = 1;
326 ts_chan_num_to_plane = -1;
327 ts_chan_type_to_element = -1;
328 package = kPackageNull;
343 std::cerr <<
"LoadChannelMap: Unknown line: " << mapstr.GetLine().c_str() << std::endl;
351 Int_t unused_size_counter = 0;
356 for(
size_t slot_size =0; slot_size <
fModuleIndex.at(i).size(); slot_size++)
361 std::cout <<
"[" << i <<
","<< slot_size <<
"] "
362 <<
" module index " << m_idx
366 unused_size_counter++;
373 printf(
"Total unused size of fModuleIndex vector %6d\n", unused_size_counter);
377 std::cout <<
"[" << i <<
"] "
383 printf(
"\n------------- MD LoadChannelMap End%s\n\n", mapfile.Data());
416 for (
size_t i=0; i<
fPMTs.size(); i++) {
417 for (
size_t j=0; j<
fPMTs.at(i).size(); j++) {
418 fPMTs.at(i).at(j).SetValue(0);
422 for (
size_t i=0; i<
fSCAs.size(); i++) {
423 fSCAs.at(i).ClearEventData();
436 TString subsystem_name;
438 Int_t bank_index = 0;
441 UInt_t vme_slot_num = 0;
443 Bool_t local_debug =
false;
452 <<
" local_f1tdc " << local_f1tdc <<
"\n";
464 if(local_debug) std::cout <<
"-----------------------------------------------------" << std::endl;
466 std::cout <<
"QwMainDetector : "
469 <<
"ProcessConfigurationBuffer"
472 << std::setw(2) << roc_id
473 <<
" Bank [index,id]["
484 vme_slot_num = slot_id;
488 <<
"Slot [id, VME num] ["
489 << std::setw(2) << slot_id
491 << std::setw(2) << vme_slot_num
501 if (tdc_index not_eq -1) {
503 if(local_f1tdc)
delete local_f1tdc; local_f1tdc = 0;
505 local_f1tdc =
new QwF1TDC(roc_id, vme_slot_num);
515 std::cout <<
"F1TDC index "
529 std::cout <<
"Unused in "
533 <<
" local_f1tdc at "
543 if (slot_id == 0) std::cout <<
" ";
544 else if (slot_id == 1) std::cout <<
"MVME CPU ";
545 else std::cout <<
"Trigger Interface";
550 if(local_debug) std::cout << std::endl;
557 std::cout <<
"-----------------------------------------------------" << std::endl;
577 std::cout <<
"QwMainDetector::QwMainDetector: "
578 <<
"Begin processing ROC" << roc_id <<
", Bank "<<bank_id
579 <<
"(hex: "<<std::hex<<bank_id<<std::dec<<
")"
580 <<
", num_words "<<num_words<<
", index "<<index<<std::endl;
582 if (index>=0 && num_words>0)
586 for (
size_t i=0; i<num_words ; i++)
600 std::cout<<
"This is a valid QDC/TDC data word. Index="<<index
609 catch (std::exception&
e)
611 std::cerr <<
"Standard exception from QwMainDetector::FillRawTDCWord: "
612 << e.what() << std::endl;
614 std::cerr <<
" Parameters: index=="<<index
616 <<
"; GetV775ChannelNumber()=="<<chan
620 std::cerr <<
" GetModuleIndex()=="<<modindex
621 <<
"; fModulePtrs.at(modindex).size()=="
623 <<
"; fModulePtrs.at(modindex).at(chan).first {module type}=="
625 <<
"; fModulePtrs.at(modindex).at(chan).second {signal index}=="
633 else if (bank_id==
fBankID[1]) {
635 if (buffer[0]/32!=1)
return 0;
637 if (index>=0 && num_words>0) {
639 UInt_t words_read = 0;
640 for (
size_t i=0; i<
fSCAs.size(); i++) {
647 else if (bank_id==
fBankID[2]) {
652 Bool_t local_debug_f1 =
false;
654 Int_t bank_index = 0;
658 Int_t dummy_slot_number = 0;
659 Int_t dummy_chan_number = 0;
661 Bool_t data_integrity_flag =
false;
662 Bool_t temp_print_flag =
false;
664 UInt_t hit_counter = 0;
668 if (bank_index>=0 && num_words>0) {
673 if (local_debug_f1 ) {
674 std::cout <<
"\nQwMainDetector::ProcessEvBuffer: "
675 <<
"Begin processing ROC"
680 <<
" Subbbank Index "
695 if (data_integrity_flag) {
697 dummy_slot_number = 0;
698 dummy_chan_number = 0;
700 for (UInt_t i=0; i<num_words ; i++) {
711 if ( tdc_slot_number == 31) {
731 if (dummy_slot_number == tdc_slot_number && dummy_chan_number == tdc_chan_number) {
739 printf(
"MD::ProcessEvBuffer: [%4d] hit counter %d, bank_index %2d slot_number [%2d,%2d] chan [%2d,%2d] data %10d %10.2f\n", i, hit_counter,
743 if (hit_counter == 0) {
744 FillRawWord (bank_index, tdc_slot_number, tdc_chan_number, tdc_data);
750 FillRawTDCWord(bank_index, tdc_slot_number, tdc_chan_number, tdc_data);
752 dummy_slot_number = tdc_slot_number;
753 dummy_chan_number = tdc_chan_number;
757 catch (std::exception&
e) {
758 std::cerr <<
"Standard exception from QwMainDetector::FillRawWord: "
759 << e.what() << std::endl;
760 std::cerr <<
" Parameters: index==" <<bank_index
761 <<
"; GetF1SlotNumber()==" <<tdc_slot_number
762 <<
"; GetF1ChannelNumber()=="<<tdc_chan_number
763 <<
"; GetF1Data()==" <<tdc_data
780 TString elementname =
"";
782 Double_t rawtime_arb_unit = 0.0;
783 Double_t corrected_time_arb_unit = 0.0;
784 Double_t time_ns = 0.0;
787 Int_t bank_index = 0;
790 for (
size_t i=0; i<
fPMTs.size(); i++)
792 for (
size_t j=0; j<
fPMTs.at(i).size(); j++)
794 elementname =
fPMTs.at(i).at(j).GetElementName();
797 if (elementname.EndsWith(
"f1") ) {
798 rawtime_arb_unit =
fPMTs.at(i).at(j).GetValue();
800 if ( rawtime_arb_unit not_eq 0.0) {
802 if ( not elementname.Contains(
"reftime") ) {
803 bank_index =
fPMTs.at(i).at(j).GetSubbankID();
804 slot_num =
fPMTs.at(i).at(j).GetModule();
807 fPMTs.at(i).at(j).SetValue(time_ns);
813 fPMTs.at(i).at(j).SetValue(rawtime_arb_unit);
817 fPMTs.at(i).at(j).SetValue(rawtime_arb_unit);
822 fPMTs.at(i).at(j).ProcessEvent();
833 for (
size_t i=0; i<
fSCAs.size(); i++)
835 fSCAs.at(i).ProcessEvent();
844 options.
AddOptions()(
"enable-md-software-meantime",
846 "Create Software meantime for MD in QwHits"
848 options.
AddOptions()(
"set-md-software-meantime-timewindow",
849 po::value<Double_t>()->default_value(50.0),
850 "TimeWindow (ns) for MD Software meantime"
867 for (
size_t i=0; i<
fPMTs.size(); i++)
869 for (
size_t j=0; j<
fPMTs.at(i).size(); j++)
871 fPMTs.at(i).at(j).ConstructHistograms(folder, prefix);
875 for (
size_t i=0; i<
fSCAs.size(); i++)
877 fSCAs.at(i).ConstructHistograms(folder, prefix);
885 for (
size_t i=0; i<
fPMTs.size(); i++)
887 for (
size_t j=0; j<
fPMTs.at(i).size(); j++)
889 fPMTs.at(i).at(j).FillHistograms();
893 for (
size_t i=0; i<
fSCAs.size(); i++)
895 fSCAs.at(i).FillHistograms();
905 if (prefix==
"") basename =
"maindet";
906 else basename = prefix;
908 TString element_name =
"";
912 for (
size_t i=0; i<
fPMTs.size(); i++)
914 for (
size_t j=0; j<
fPMTs.at(i).size(); j++)
916 element_name =
fPMTs.at(i).at(j).GetElementName();
917 if (element_name!=
"") {
918 values.push_back(0.0);
919 list +=
":" + element_name +
"/D";
927 for (
size_t i=0; i<
fSCAs.size(); i++)
929 element_name =
fSCAs.at(i).GetElementName();
930 if (element_name !=
"") {
931 values.push_back(0.0);
932 list +=
":" + element_name +
"/D";
937 list = list(1,list.Length()-1);
952 for (
size_t i=0; i<
fPMTs.size(); i++) {
953 for (
size_t j=0; j<
fPMTs.at(i).size(); j++) {
954 if (
fPMTs.at(i).at(j).GetElementName()!=
"") {
955 values[index] =
fPMTs.at(i).at(j).GetValue();
961 for (
size_t i=0; i<
fSCAs.size(); i++) {
962 if (
fSCAs.at(i).GetElementName() !=
"") {
963 values[index] =
fSCAs.at(i).GetValue();
976 for (
size_t i=0; i<
fPMTs.size(); i++)
978 for (
size_t j=0; j<
fPMTs.at(i).size(); j++)
986 std::cerr <<
"QwMainDetector::operator=: Problems!!!"
1034 std::cout<<
"QwMainDetector::RegisterSubbank()"
1035 <<
" ROC " << current_roc_id
1036 <<
" Subbank " << bank_id
1046 std::pair<EQwModuleType, Int_t> tmppair;
1048 tmppair.second = -1;
1070 std::cerr <<
"QwMainDetector::RegisterSlotNumber: Slot number "
1071 << slot_id <<
" is larger than the number of slots per ROC, "
1079 moduletype.ToUpper();
1084 if (moduletype==
"V792") {
1087 else if (moduletype==
"V775") {
1090 else if (moduletype==
"F1TDC") {
1093 else if (moduletype==
"SIS3801") {
1118 Int_t chan, UInt_t data)
1125 Int_t chanindex =
fModulePtrs.at(modindex).at(chan).second;
1134 fPMTs.at(modtype).at(chanindex).SetValue(data);
1135 fPMTs.at(modtype).at(chanindex).SetSubbankID(bank_index);
1136 fPMTs.at(modtype).at(chanindex).SetModule(slot_num);
1147 Bool_t local_debug =
false;
1154 if (tdcindex not_eq -1) {
1166 Int_t plane =
fDetectorIDs.at(tdcindex).at(chan).fPlane;
1168 Int_t element =
fDetectorIDs.at(tdcindex).at(chan).fElement;
1169 Int_t octant =
fDetectorIDs.at(tdcindex).at(chan).fOctant;
1174 printf(
"tdcindx %d bank_idx %d, slot %d, plane %d, element %d, package %d\n",
1176 bank_index, slot_num, (Int_t) plane, (Int_t) element, (Int_t) package);
1179 if (plane == -1 or element == -1){
1202 direction =
fDetectorIDs.at(tdcindex).at(chan).fDirection;
1211 std::cout <<
"At QwMainDetector::FillRawTDCWord "
1212 <<
" bank index " << bank_index
1213 <<
" slot num " << slot_num
1214 <<
" chan num " << chan
1215 <<
" hitcnt " << hitcnt
1216 <<
" plane " << plane
1217 <<
" wire " << element
1218 <<
" package " <<
package
1219 << " diection " << direction
1221 << " fTDCHits.size() " << fTDCHits.size()
1256 UInt_t bank_index = 0;
1257 Double_t raw_time_arb_unit = 0.0;
1258 Double_t ref_time_arb_unit = 0.0;
1259 Double_t time_arb_unit = 0.0;
1262 Bool_t local_debug =
false;
1265 TString reference_name1 =
"MasterTrigger";
1269 for ( std::vector<QwHit>::iterator hit=
fTDCHits.begin(); hit!=
fTDCHits.end(); hit++ )
1272 bank_index = hit -> GetSubbankID();
1273 slot_num = hit -> GetModule();
1274 raw_time_arb_unit = (Double_t) hit -> GetRawTime();
1275 ref_time_arb_unit =
fF1RefContainer -> GetReferenceTimeAU(bank_index, reference_name1);
1287 hit -> SetTime(time_arb_unit);
1288 hit -> SetRawRefTime((UInt_t) ref_time_arb_unit);
1292 <<
" BankIndex " << std::setw(2) << bank_index
1293 <<
" Slot " << std::setw(2) << slot_num
1294 <<
" RawTime : " << std::setw(6) << raw_time_arb_unit
1295 <<
" RefTime : " << std::setw(6) << ref_time_arb_unit
1296 <<
" time : " << std::setw(6) << time_arb_unit
1341 for(std::vector<QwHit>::iterator iter=
fTDCHits.begin(); iter!=
fTDCHits.end(); ++iter)
1366 if( !option )
return;
1370 Bool_t local_debug =
false;
1372 Long64_t ev_num = 0;
1376 Int_t hitnumber = 0;
1377 Double_t timens = 0.0;
1380 Int_t bank_index = 0;
1389 Int_t v_plane_idx = 0;
1391 for( std::vector<QwHit>::iterator iter=
fTDCHits.begin(); iter!=
fTDCHits.end(); ++iter)
1394 if( plane ==1 || plane == 2 || plane == 3 || plane ==4 || plane == 5 || plane ==6 || plane == 7 || plane == 8 )
1396 v_plane_idx = plane-1;
1397 element = iter->GetElement();
1398 hitnumber = iter->GetHitNumber();
1399 timens = iter->GetTimeNs();
1419 if(v_plane_idx%2 ==0) {
1420 package = kPackage1;
1422 else if (v_plane_idx%2 ==1) {
1423 package = kPackage2;
1439 md_mt_time -> Print(local_debug);
1441 QwHit software_meantime_hit(bank_index, slot_num, chan_num, v_smt_idx,
1442 region, package, octant, plane, direction,
1443 md_mt_time->GetSoftwareMeantimeHitElement()
1445 software_meantime_hit.
SetTimens(md_mt_time->GetMeanTime());
1446 fTDCHits.push_back(software_meantime_hit);
1448 QwHit software_positive_hit(bank_index, slot_num, chan_num, v_smt_idx,
1449 region, package, octant, plane, direction,
1450 md_mt_time->GetSoftwarePositiveHitElement()
1452 software_positive_hit.
SetTimens(md_mt_time->GetPositiveValue());
1453 software_positive_hit.SetHitNumberR(md_mt_time->GetPositiveHitId());
1454 fTDCHits.push_back(software_positive_hit);
1456 QwHit software_negative_hit(bank_index, slot_num, chan_num, v_smt_idx,
1457 region, package, octant, plane, direction,
1458 md_mt_time->GetSoftwareNegativeHitElement()
1460 software_negative_hit.
SetTimens(md_mt_time->GetNegativeValue());
1461 software_negative_hit.SetHitNumberR(md_mt_time->GetNegativeHitId());
1462 fTDCHits.push_back(software_negative_hit);
1464 QwHit software_subtract_hit(bank_index, slot_num, chan_num, v_smt_idx,
1465 region, package, octant, plane, direction,
1466 md_mt_time->GetSoftwareSubtractHitElement()
1468 software_subtract_hit.
SetTimens(md_mt_time->GetSubtractTime());
1469 fTDCHits.push_back(software_subtract_hit);
1478 TString output =
"";
1480 for(std::vector<QwHit>::iterator iter=
fTDCHits.begin(); iter!=
fTDCHits.end(); ++iter)
1483 bank_index = iter->GetSubbankID();
1484 slot_num = iter->GetModule();
1485 chan_num = iter->GetChannel();
1486 package = iter->GetPackage();
1487 plane = iter->GetPlane();
1488 element = iter->GetElement();
1489 hitnumber = iter->GetHitNumber();
1490 timens = iter->GetTimeNs();
1493 output += Form(
" Bank ID %+2d", bank_index);
1494 output += Form(
" Slot %+3d", slot_num);
1495 output += Form(
" Chan %+4d", chan_num);
1496 output += Form(
" Package %2d", (Int_t) package);
1497 output += Form(
" Plane %2d", plane);
1498 output +=
" Element ";
1501 output += hitnumber;
1502 output += Form(
" TimeNs %+10.2f\n", timens);
1506 std::cout <<
"Size fTDCHits " <<
fTDCHits.size()
1507 <<
" Event Number " <<ev_num <<
"\n" << output <<std::endl;
1518 Int_t modindex = -1;
1531 Int_t chanindex = -1;
1532 if (modtype < (Int_t)
fPMTs.size()) {
1533 for (
size_t chan = 0; chan <
fPMTs.at(modtype).size(); chan++) {
1534 if (name ==
fPMTs.at(modtype).at(chan).GetElementName()) {
1562 Int_t bank_flag = 0;
1563 Int_t bank_index = 0;
1564 Int_t module_index = 0;
1567 UInt_t vme_slot_num = 0;
1569 std::cout <<
" QwMainDetector : "
1571 <<
"::ReportConfiguration fDetectorIDs.size() "
1575 for ( i=0; i<
fROC_IDs.size(); i++ )
1580 for ( j=0; j<
fBank_IDs.at(i).size(); j++ )
1583 if(bank_flag == 0)
continue;
1591 std::cout <<
"ROC [index, Num]["
1594 << std::setw(2) << roc_num
1596 <<
" Bank [index,id]["
1610 vme_slot_num = slot_id;
1613 <<
"Slot [id, VME num] ["
1614 << std::setw(2) << slot_id
1616 << std::setw(2) << vme_slot_num
1618 if ( module_index == -1 ) {
1627 << module_index << std::endl;
1633 for(
size_t midx = 0; midx <
fDetectorIDs.size(); midx++ )
1635 for (
size_t chan = 0 ; chan<
fDetectorIDs.at(midx).size(); chan++)
1637 std::cout <<
"[" << midx <<
","<< chan <<
"] "
QwMainDetector & operator=(const QwMainDetector &value)
Int_t GetSubbankIndex() const
#define QwMessage
Predefined log drain for regular messages.
Int_t ProcessConfigurationBuffer(const UInt_t roc_id, const UInt_t bank_id, UInt_t *buffer, UInt_t num_words)
void AddQwF1TDC(QwF1TDC *in)
std::map< TString, TString > fDetectorMaps
std::vector< EQwModuleType > fModuleTypes
void FillHistograms()
Fill the histograms for this subsystem.
std::vector< std::vector< Int_t > > fModuleIndex
MeanTimeContainer * fSoftwareMeantimeContainer[8]
F1TDCs configuration and reference siganls container.
std::vector< std::vector< Double_t > > fReferenceData
UInt_t GetTDCChannelNumber()
void FillRawWord(Int_t bank_index, Int_t slot_num, Int_t chan, UInt_t data)
#define default_bool_value(b)
Bool_t IsSlotRegistered(Int_t bank_index, Int_t slot_num) const
void SetF1TDCBuffer(UInt_t *buffer, UInt_t num_words)
void SubtractReferenceTimes()
const UInt_t & GetTDCMaxChannels() const
void FillTreeVector(std::vector< Double_t > &values) const
Fill the tree vector.
std::vector< std::vector< std::pair< EQwModuleType, Int_t > > > fModulePtrs
Double_t fF1TDCResolutionNS
void ReportConfiguration(Bool_t verbose)
Int_t RegisterSlotNumber(const UInt_t slot_id)
static UInt_t GetUInt(const TString &varvalue)
std::vector< QwHit > fTDCHits
virtual ~QwMainDetector()
Virtual destructor.
const UInt_t & GetTDCData() const
This is the main executable for the tracking analysis.
Int_t SoftwareMTSize() const
Bool_t HasDataLoaded() const
one F1TDC configuration and reference signal(s) holder
Bool_t CheckDataIntegrity(const UInt_t roc_id, UInt_t *buffer, UInt_t num_words)
Software Meantime container.
void AddSoftwareMeantimeToHits(Bool_t option)
Int_t fCurrentBankIndex
Name of this subsystem (the region).
void SetSystemName(const TString name)
virtual void ConstructHistograms()
Construct the histograms for this subsystem.
void FillRawTDCWord(Int_t bank_index, Int_t slot_num, Int_t chan, UInt_t data)
po::options_description_easy_init AddOptions(const std::string &blockname="Specialized options")
Add an option to a named block or create new block.
Int_t ProcessEvBuffer(const UInt_t roc_id, const UInt_t bank_id, UInt_t *buffer, UInt_t num_words)
TODO: The non-event-type-aware ProcessEvBuffer routine should be replaced with the event-type-aware v...
Int_t FindSignalIndex(const EQwModuleType modtype, const TString &name) const
const UInt_t & GetTDCSlotNumber() const
T GetValue(const std::string &key)
Get a templated value.
Int_t LoadChannelMap(TString mapfile)
Mandatory map file definition.
const UInt_t & GetTDCChannelNumber() const
static void DefineOptions()
Define options function (note: no virtual static functions in C++)
QwMainDetector()
Private default constructor (not implemented, will throw linker error on use)
void DecodeTDCWord(UInt_t &word, const UInt_t roc_id=0)
void SetEventTypeMask(const UInt_t mask)
Set event type mask.
static const Int_t kF1ReferenceChannelNumber
Bool_t fSoftwareMeantimeOption
size_t fTreeArrayIndex
Tree indices.
static const UInt_t kMaxNumberOfModulesPerROC
one software meantim holder
Int_t GetModuleIndex(size_t bank_index, size_t slot_num) const
static const Int_t kMaxNumberOfQwHitPlane
Double_t ReferenceSignalCorrection(Double_t raw_time, Double_t ref_time, Int_t bank_index, Int_t slot)
MeanTime * GetMeanTimeObject(Int_t index)
UInt_t GetTDCSlotNumber()
void SetReferenceSignal(Int_t bank_index, Int_t slot, Int_t chan, UInt_t data, Bool_t debug=false)
Double_t DoneF1TDCsConfiguration()
Bool_t WireMatches(EQwRegionID region, EQwDetectorPackage package, Int_t plane, Int_t wire)
void SetTimens(const Double_t timens)
Bool_t IsValidDataword() const
The pure virtual base class of all subsystems.
Int_t LinkChannelToSignal(const UInt_t chan, const TString &name)
UInt_t GetCodaEventNumber() const
Get the internal record of the CODA event number.
Int_t RegisterSubbank(const UInt_t bank_id)
void SetF1BankIndex(const Int_t bank_index)
const MQwF1TDC GetF1TDCDecoder() const
class QwScaler_Channel< 0x00ffffff, 0 > QwSIS3801D24_Channel
void SetF1SystemName(const TString name)
std::vector< std::vector< UInt_t > > fBank_IDs
Vector of Bank IDs per ROC ID associated with this subsystem.
Int_t fCurrentROC_ID
ROC ID that is currently being processed.
Int_t RegisterSubbank(const UInt_t bank_id)
Tell the object that it will decode data from this sub-bank in the ROC currently open for registratio...
virtual Int_t RegisterROCNumber(const UInt_t roc_id, const UInt_t bank_id=0)
Tell the object that it will decode data from this ROC and sub-bank.
void SetPlane(const Int_t in)
EQwModuleType fCurrentType
std::vector< UInt_t > fROC_IDs
Vector of ROC IDs associated with this subsystem.
void SetF1TDCIndex(const Int_t tdc_index)
Int_t fCurrentModuleIndex
std::vector< QwSIS3801D24_Channel > fSCAs
void ClearAllBankRegistrations()
Int_t RegisterROCNumber(const UInt_t roc_id)
QwSubsystemArray * GetParent(const unsigned int parent=0) const
Get the parent of this subsystem.
Hit structure uniquely defining each hit.
std::vector< std::pair< Int_t, Int_t > > fReferenceChannels
EQwModuleType RegisterModuleType(TString moduletype)
QwF1TDContainer * fF1TDContainer
Double_t ReturnTimeCalibration(Double_t time_arb_unit)
void ProcessOptions(QwOptions &options)
Process the command line options.
void Print(const Option_t *options=0) const
std::vector< Int_t > fSCAs_offset
Double_t fSoftwareMeantimeTimeWindowNs
void DecodeTDCWord(UInt_t &word, const UInt_t roc_id)
std::map< TString, size_t > fSCAs_map
size_t fTreeArrayNumEntries
std::vector< std::vector< QwDetectorID > > fDetectorIDs
void ClearAllBankRegistrations()
Clear all registration of ROC and Bank IDs for this subsystem.
F1TDCReferenceContainer * fF1RefContainer
std::vector< std::vector< QwPMT_Channel > > fPMTs
#define RegisterSubsystemFactory(A)
void FillHardwareErrorSummary()
Hardware error summary.
void ConstructBranchAndVector(TTree *tree, TString &prefix, std::vector< Double_t > &values)
Construct the branch and tree vector.
TString GetSubsystemName() const
UInt_t kMaxNumberOfChannelsPerF1TDC
Bool_t IsF1ReferenceChannel(Int_t slot, Int_t chan)
void SetDataLoaded(Bool_t flag)