12 #include "boost/bind.hpp"
75 TString varvalue =
"";
86 Int_t ts_chan_num_to_plane = 0;
87 Int_t ts_chan_type_to_element = 0;
98 Bool_t local_debug =
false;
99 Int_t reference_counter = 0;
107 while (mapstr.ReadNextLine()){
108 mapstr.TrimComment(
'!');
109 mapstr.TrimWhitespace();
111 if (mapstr.LineIsEmpty())
continue;
113 if (mapstr.HasVariablePair(
"=",varname,varvalue)){
118 if (varname==
"roc") {
120 }
else if (varname==
"qdc_bank") {
123 }
else if (varname==
"sca_bank") {
126 }
else if (varname==
"f1tdc_bank") {
129 }
else if (varname==
"slot") {
132 }
else if (varname==
"module") {
137 modtype = mapstr.GetTypedNextToken<TString>();
138 modnum = mapstr.GetTypedNextToken<Int_t>();
139 channum = mapstr.GetTypedNextToken<Int_t>();
140 dettype = mapstr.GetTypedNextToken<TString>();
141 name = mapstr.GetTypedNextToken<TString>();
143 if (local_debug) printf(
"%8s, %d, %d %s, %s\n", modtype.Data(), modnum, channum, dettype.Data(), name.Data());
145 if (modtype==
"SIS3801") {
147 localchannel.SetNeedsExternalClock(kFALSE);
148 fSCAs.push_back(localchannel);
150 fSCAs_offset.push_back(QwSIS3801D24_Channel::GetBufferOffset(modnum,channum));
159 else if (modtype==
"V792") {
176 else if( modtype==
"F1TDC") {
190 if (name==
"ts_reftime_f1") {
202 package = kPackageNull;
209 if (name==
"ts2m_f1") {
210 ts_chan_num_to_plane = 2;
211 ts_chan_type_to_element = 2;
214 else if (name==
"ts2p_f1") {
215 ts_chan_num_to_plane = 2;
216 ts_chan_type_to_element = 1;
219 else if (name==
"ts2mt_f1") {
220 ts_chan_num_to_plane = 2;
221 ts_chan_type_to_element = 0;
224 else if (name==
"ts1m_f1") {
225 ts_chan_num_to_plane = 1;
226 ts_chan_type_to_element = 2;
229 else if (name==
"ts1p_f1") {
230 ts_chan_num_to_plane = 1;
231 ts_chan_type_to_element = 1;
234 else if (name==
"ts1mt_f1") {
235 ts_chan_num_to_plane = 1;
236 ts_chan_type_to_element = 0;
241 ts_chan_num_to_plane = -1;
242 ts_chan_type_to_element = -1;
243 package = kPackageNull;
256 std::cerr <<
"LoadChannelMap: Unknown line: " << mapstr.GetLine().c_str() << std::endl;
264 Int_t unused_size_counter = 0;
269 for(
size_t slot_size =0; slot_size <
fModuleIndex.at(i).size(); slot_size++)
274 std::cout <<
"[" << i <<
","<< slot_size <<
"] "
275 <<
" module index " << m_idx
279 unused_size_counter++;
286 printf(
"Total unused size of fModuleIndex vector %6d\n", unused_size_counter);
290 std::cout <<
"[" << i <<
"] "
296 printf(
"\n------------- TS LoadChannelMap End%s\n\n", mapfile.Data());
324 for (i=0; i<
fPMTs.size(); i++)
326 for (
size_t j=0; j<
fPMTs.at(i).size(); j++)
328 fPMTs.at(i).at(j).SetValue(0);
332 for (i=0; i<
fSCAs.size(); i++)
334 fSCAs.at(i).ClearEventData();
345 TString subsystem_name;
347 Int_t bank_index = 0;
350 UInt_t vme_slot_num = 0;
352 Bool_t local_debug =
false;
361 <<
" local_f1tdc " << local_f1tdc <<
"\n";
373 if(local_debug) std::cout <<
"-----------------------------------------------------" << std::endl;
375 std::cout <<
"QwTriggerScintillator : "
378 <<
"ProcessConfigurationBuffer"
381 << std::setw(2) << roc_id
382 <<
" Bank [index,id]["
393 vme_slot_num = slot_id;
397 <<
"Slot [id, VME num] ["
398 << std::setw(2) << slot_id
400 << std::setw(2) << vme_slot_num
410 if (tdc_index not_eq -1) {
412 if(local_f1tdc)
delete local_f1tdc; local_f1tdc = 0;
414 local_f1tdc =
new QwF1TDC(roc_id, vme_slot_num);
424 std::cout <<
"F1TDC index "
438 std::cout <<
"Unused in "
442 <<
" local_f1tdc at "
452 if (slot_id == 0) std::cout <<
" ";
453 else if (slot_id == 1) std::cout <<
"MVME CPU ";
454 else std::cout <<
"Trigger Interface";
459 if(local_debug) std::cout << std::endl;
466 std::cout <<
"-----------------------------------------------------" << std::endl;
484 if (index>=0 && num_words>0) {
487 for(
size_t i=0; i<num_words ; i++) {
500 catch (std::exception&
e) {
501 std::cerr <<
"Standard exception from QwTriggerScintillator::FillRawWord: "
502 << e.what() << std::endl;
504 std::cerr <<
" Parameters: index=="<<index
506 <<
"; GetV775ChannelNumber()=="<<chan
510 std::cerr <<
" GetModuleIndex()=="<<modindex
511 <<
"; fModulePtrs.at(modindex).size()=="
513 <<
"; fModulePtrs.at(modindex).at(chan).first {module type}=="
515 <<
"; fModulePtrs.at(modindex).at(chan).second {signal index}=="
524 else if (bank_id==
fBankID[1]) {
527 if (buffer[0]/32!=1)
return 0;
529 if (index>=0 && num_words>0) {
531 UInt_t words_read = 0;
532 for (
size_t i=0; i<
fSCAs.size(); i++) {
539 else if (bank_id==
fBankID[2]) {
543 Bool_t local_debug_f1 =
false;
545 Int_t bank_index = 0;
549 Int_t dummy_slot_number = 0;
550 Int_t dummy_chan_number = 0;
552 Bool_t data_integrity_flag =
false;
553 Bool_t temp_print_flag =
false;
555 UInt_t hit_counter = 0;
559 if (bank_index>=0 && num_words>0) {
572 if (data_integrity_flag) {
574 dummy_slot_number = 0;
575 dummy_chan_number = 0;
577 if(local_debug_f1) printf(
"\n");
578 for (UInt_t i=0; i<num_words ; i++) {
590 if ( tdc_slot_number == 31) {
610 if (dummy_slot_number == tdc_slot_number && dummy_chan_number == tdc_chan_number) {
618 printf(
"TS::ProcessEvBuffer: [%4d] hit counter %d, bank_index %2d slot_number [%2d,%2d] chan [%2d,%2d] data %10d %10.2f\n", i, hit_counter,
622 if (hit_counter == 0) {
623 FillRawWord (bank_index, tdc_slot_number, tdc_chan_number, tdc_data);
629 FillRawTDCWord(bank_index, tdc_slot_number, tdc_chan_number, tdc_data);
631 dummy_slot_number = tdc_slot_number;
632 dummy_chan_number = tdc_chan_number;
636 catch (std::exception&
e) {
637 std::cerr <<
"Standard exception from QwTriggerScintillator::FillRawWord: "
638 << e.what() << std::endl;
639 std::cerr <<
" Parameters: index==" <<bank_index
640 <<
"; GetF1SlotNumber()==" <<tdc_slot_number
641 <<
"; GetF1ChannelNumber()=="<<tdc_chan_number
642 <<
"; GetF1Data()==" <<tdc_data
659 TString elementname =
"";
660 Double_t rawtime_arb_unit = 0.0;
661 Double_t corrected_time_arb_unit = 0.0;
662 Double_t time_ns = 0.0;
664 Int_t bank_index = 0;
667 for (
size_t i=0; i<
fPMTs.size(); i++)
669 for (
size_t j=0; j<
fPMTs.at(i).size(); j++)
672 elementname =
fPMTs.at(i).at(j).GetElementName();
674 if (elementname.EndsWith(
"f1") ) {
675 rawtime_arb_unit =
fPMTs.at(i).at(j).GetValue();
677 if ( rawtime_arb_unit not_eq 0.0) {
679 if ( not elementname.Contains(
"reftime") ) {
680 bank_index =
fPMTs.at(i).at(j).GetSubbankID();
681 slot_num =
fPMTs.at(i).at(j).GetModule();
684 fPMTs.at(i).at(j).SetValue(time_ns);
692 fPMTs.at(i).at(j).SetValue(rawtime_arb_unit);
696 fPMTs.at(i).at(j).SetValue(rawtime_arb_unit);
701 fPMTs.at(i).at(j).ProcessEvent();
744 for (i=0; i<
fSCAs.size(); i++)
746 fSCAs.at(i).ProcessEvent();
756 options.
AddOptions()(
"enable-ts-software-meantime",
758 "Create Software meantime for TS in QwHits"
760 options.
AddOptions()(
"set-ts-software-meantime-timewindow",
761 po::value<Double_t>()->default_value(20.0),
762 "TimeWindow (ns) for TS Software meantime"
778 for (
size_t i=0; i<
fPMTs.size(); i++){
779 for (
size_t j=0; j<
fPMTs.at(i).size(); j++){
780 fPMTs.at(i).at(j).ConstructHistograms(folder, prefix);
784 for (
size_t i=0; i<
fSCAs.size(); i++) {
785 fSCAs.at(i).ConstructHistograms(folder, prefix);
792 for (
size_t i=0; i<
fPMTs.size(); i++){
793 for (
size_t j=0; j<
fPMTs.at(i).size(); j++){
794 fPMTs.at(i).at(j).FillHistograms();
798 for (
size_t i=0; i<
fSCAs.size(); i++) {
799 fSCAs.at(i).FillHistograms();
809 if (prefix==
"") basename =
"trigscint";
810 else basename = prefix;
812 TString element_name =
"";
815 for (
size_t i=0; i<
fPMTs.size(); i++){
816 for (
size_t j=0; j<
fPMTs.at(i).size(); j++){
817 element_name =
fPMTs.at(i).at(j).GetElementName();
818 if (element_name!=
"") {
819 values.push_back(0.0);
820 list +=
":" + element_name +
"/D";
827 for (
size_t i=0; i<
fSCAs.size(); i++){
828 element_name =
fSCAs.at(i).GetElementName();
829 if (element_name !=
"") {
830 values.push_back(0.0);
831 list +=
":" + element_name +
"/D";
836 list = list(1,list.Length()-1);
849 for (
size_t i=0; i<
fPMTs.size(); i++){
850 for (
size_t j=0; j<
fPMTs.at(i).size(); j++){
851 if (
fPMTs.at(i).at(j).GetElementName()!=
"") {
852 values[index] =
fPMTs.at(i).at(j).GetValue();
858 for (
size_t i=0; i<
fSCAs.size(); i++) {
859 if (
fSCAs.at(i).GetElementName() !=
"") {
860 values[index] =
fSCAs.at(i).GetValue();
874 for (
size_t i=0; i<
fPMTs.size(); i++){
875 for (
size_t j=0; j<
fPMTs.at(i).size(); j++){
880 std::cerr <<
"QwTriggerScintillator::operator=: Problems!!!"
927 std::cout<<
"QwTriggerScintillator::RegisterSubbank()"
928 <<
" ROC " << current_roc_id
929 <<
" Subbank " << bank_id
938 std::pair<EQwModuleType, Int_t> tmppair;
969 std::cerr <<
"QwTriggerScintillator::RegisterSlotNumber: Slot number "
970 << slot_id <<
" is larger than the number of slots per ROC, "
978 moduletype.ToUpper();
983 if (moduletype==
"V792"){
985 }
else if (moduletype==
"V775"){
987 }
else if (moduletype==
"F1TDC") {
989 }
else if (moduletype==
"SIS3801") {
1013 Int_t chan, UInt_t data)
1016 if (modindex != -1){
1018 Int_t chanindex =
fModulePtrs.at(modindex).at(chan).second;
1027 fPMTs.at(modtype).at(chanindex).SetValue(data);
1028 fPMTs.at(modtype).at(chanindex).SetSubbankID(bank_index);
1029 fPMTs.at(modtype).at(chanindex).SetModule(slot_num);
1042 Bool_t local_debug =
false;
1049 if (tdcindex not_eq -1) {
1063 Int_t plane =
fDetectorIDs.at(tdcindex).at(chan).fPlane;
1065 Int_t element =
fDetectorIDs.at(tdcindex).at(chan).fElement;
1067 Int_t octant =
fDetectorIDs.at(tdcindex).at(chan).fOctant;
1070 printf(
"bank_idx %d, slot %d, plane %d, element %d, package %d\n",
1071 bank_index, slot_num, (Int_t) plane, (Int_t) element, (Int_t) package);
1074 if (plane == -1 or element == -1){
1082 std::cout <<
"At QwTriggerScintillator::FillRawTDCWord "
1083 <<
" bank index " << bank_index
1084 <<
" slot num " << slot_num
1085 <<
" chan num " << chan
1087 <<
" plane " << plane
1088 <<
" wire " << element
1089 <<
" package " <<
package
1090 << " diection " << direction
1092 << " fTDCHits.size() " << 0
1097 direction =
fDetectorIDs.at(tdcindex).at(chan).fDirection;
1122 std::cout <<
"At QwTriggerScintillator::FillRawTDCWord "
1123 <<
" bank index " << bank_index
1124 <<
" slot num " << slot_num
1125 <<
" chan num " << chan
1126 <<
" hitcnt " << hitcnt
1127 <<
" plane " << plane
1128 <<
" wire " << element
1129 <<
" package " <<
package
1130 << " diection " << direction
1132 << " fTDCHits.size() " << fTDCHits.size()
1148 UInt_t bank_index = 0;
1149 Double_t raw_time_arb_unit = 0.0;
1150 Double_t ref_time_arb_unit = 0.0;
1151 Double_t time_arb_unit = 0.0;
1154 Bool_t local_debug =
false;
1157 TString reference_name1 =
"MasterTrigger";
1161 for ( std::vector<QwHit>::iterator hit=
fTDCHits.begin(); hit!=
fTDCHits.end(); hit++ )
1164 bank_index = hit -> GetSubbankID();
1165 slot_num = hit -> GetModule();
1166 raw_time_arb_unit = (Double_t) hit -> GetRawTime();
1167 ref_time_arb_unit =
fF1RefContainer -> GetReferenceTimeAU(bank_index, reference_name1);
1179 hit -> SetTime(time_arb_unit);
1180 hit -> SetRawRefTime((UInt_t) ref_time_arb_unit);
1184 <<
" BankIndex " << std::setw(2) << bank_index
1185 <<
" Slot " << std::setw(2) << slot_num
1186 <<
" RawTime : " << std::setw(6) << raw_time_arb_unit
1187 <<
" RefTime : " << std::setw(6) << ref_time_arb_unit
1188 <<
" time : " << std::setw(6) << time_arb_unit
1334 for(std::vector<QwHit>::iterator iter=
fTDCHits.begin(); iter!=
fTDCHits.end(); ++iter)
1360 if( !option )
return;
1365 Bool_t local_debug =
false;
1367 Long64_t ev_num = 0;
1371 Int_t hitnumber = 0;
1372 Double_t timens = 0.0;
1375 Int_t bank_index = 0;
1384 Int_t v_plane_idx = 0;
1386 for(std::vector<QwHit>::iterator iter=
fTDCHits.begin(); iter!=
fTDCHits.end(); ++iter)
1389 if(plane == 1 || plane == 2) {
1390 v_plane_idx = plane -1;
1391 element = iter->GetElement();
1392 hitnumber = iter->GetHitNumber();
1393 timens = iter->GetTimeNs();
1411 if(v_plane_idx == 0) {
1412 package = kPackage1;
1414 else if (v_plane_idx ==1){
1415 package = kPackage2;
1430 ts_mt_time -> Print(local_debug);
1432 QwHit software_meantime_hit(bank_index, slot_num, chan_num, v_smt_idx,
1433 region, package, octant, plane, direction,
1434 ts_mt_time->GetSoftwareMeantimeHitElement()
1436 software_meantime_hit.
SetTimens(ts_mt_time->GetMeanTime());
1437 fTDCHits.push_back(software_meantime_hit);
1439 QwHit software_positive_hit(bank_index, slot_num, chan_num, v_smt_idx,
1440 region, package, octant, plane, direction,
1441 ts_mt_time->GetSoftwarePositiveHitElement()
1443 software_positive_hit.
SetTimens(ts_mt_time->GetPositiveValue());
1444 software_positive_hit.SetHitNumberR(ts_mt_time->GetPositiveHitId());
1445 fTDCHits.push_back(software_positive_hit);
1447 QwHit software_negative_hit(bank_index, slot_num, chan_num, v_smt_idx,
1448 region, package, octant, plane, direction,
1449 ts_mt_time->GetSoftwareNegativeHitElement()
1451 software_negative_hit.
SetTimens(ts_mt_time->GetNegativeValue());
1452 software_negative_hit.SetHitNumberR(ts_mt_time->GetNegativeHitId());
1453 fTDCHits.push_back(software_negative_hit);
1455 QwHit software_subtract_hit(bank_index, slot_num, chan_num, v_smt_idx,
1456 region, package, octant, plane, direction,
1457 ts_mt_time->GetSoftwareSubtractHitElement()
1459 software_subtract_hit.
SetTimens(ts_mt_time->GetSubtractTime());
1460 fTDCHits.push_back(software_subtract_hit);
1467 TString output =
"";
1469 for(std::vector<QwHit>::iterator iter=
fTDCHits.begin(); iter!=
fTDCHits.end(); ++iter)
1472 bank_index = iter->GetSubbankID();
1473 slot_num = iter->GetModule();
1474 chan_num = iter->GetChannel();
1475 package = iter->GetPackage();
1477 plane = iter->GetPlane();
1478 element = iter->GetElement();
1479 hitnumber = iter->GetHitNumber();
1480 timens = iter->GetTimeNs();
1484 output += Form(
" Bank ID %+2d", bank_index);
1485 output += Form(
" Slot %+3d", slot_num);
1486 output += Form(
" Chan %+4d", chan_num);
1487 output += Form(
" Package %2d", (Int_t) package);
1488 output += Form(
" Plane %2d", plane);
1489 output +=
" Element ";
1492 output += hitnumber;
1493 output += Form(
" TimeNs %+10.2f\n", timens);
1498 std::cout <<
"Size fTDCHits " <<
fTDCHits.size()
1499 <<
" Event Number " << ev_num <<
"\n" << output << std::endl;
1510 Int_t modindex = -1;
1523 Int_t chanindex = -1;
1524 if (modtype < (Int_t)
fPMTs.size()) {
1525 for (
size_t chan = 0; chan <
fPMTs.at(modtype).size(); chan++) {
1526 if (name ==
fPMTs.at(modtype).at(chan).GetElementName()) {
1556 Int_t bank_flag = 0;
1557 Int_t bank_index = 0;
1558 Int_t module_index = 0;
1561 UInt_t vme_slot_num = 0;
1563 std::cout <<
"QwTriggerScintillator Region : "
1565 <<
"::ReportConfiguration fDetectorIDs.size() "
1569 for ( i=0; i<
fROC_IDs.size(); i++ )
1574 for ( j=0; j<
fBank_IDs.at(i).size(); j++ )
1577 if(bank_flag == 0)
continue;
1585 std::cout <<
"ROC [index, Num]["
1588 << std::setw(2) << roc_num
1590 <<
" Bank [index,id]["
1604 vme_slot_num = slot_id;
1607 <<
"Slot [id, VME num] ["
1608 << std::setw(2) << slot_id
1610 << std::setw(2) << vme_slot_num
1612 if ( module_index == -1 ) {
1621 << module_index << std::endl;
1627 for(
size_t midx = 0; midx <
fDetectorIDs.size(); midx++ )
1629 for (
size_t chan = 0 ; chan<
fDetectorIDs.at(midx).size(); chan++)
1631 std::cout <<
"[" << midx <<
","<< chan <<
"] "
EQwModuleType RegisterModuleType(TString moduletype)
Int_t GetSubbankIndex() const
#define QwMessage
Predefined log drain for regular messages.
void FillTreeVector(std::vector< Double_t > &values) const
Fill the tree vector.
EQwModuleType fCurrentType
void AddQwF1TDC(QwF1TDC *in)
std::map< TString, TString > fDetectorMaps
F1TDCs configuration and reference siganls container.
virtual ~QwTriggerScintillator()
Virtual destructor.
UInt_t GetTDCChannelNumber()
Int_t FindSignalIndex(const EQwModuleType modtype, const TString &name) const
Int_t RegisterSubbank(const UInt_t bank_id)
#define default_bool_value(b)
void SetF1TDCBuffer(UInt_t *buffer, UInt_t num_words)
const UInt_t & GetTDCMaxChannels() const
Double_t fF1TDCResolutionNS
std::vector< std::vector< QwPMT_Channel > > fPMTs
std::vector< std::pair< Int_t, Int_t > > fReferenceChannels
static UInt_t GetUInt(const TString &varvalue)
F1TDCReferenceContainer * fF1RefContainer
void ProcessOptions(QwOptions &options)
Process the command line options.
std::vector< EQwModuleType > fModuleTypes
Int_t fCurrentModuleIndex
const UInt_t & GetTDCData() const
void ReportConfiguration(Bool_t verbose)
void ClearAllBankRegistrations()
Int_t SoftwareMTSize() const
Bool_t HasDataLoaded() const
one F1TDC configuration and reference signal(s) holder
QwTriggerScintillator & operator=(const QwTriggerScintillator &value)
std::vector< std::vector< QwDetectorID > > fDetectorIDs
Int_t fCurrentBankIndex
Name of this subsystem (the region).
Int_t GetModuleIndex(size_t bank_index, size_t slot_num) const
Bool_t CheckDataIntegrity(const UInt_t roc_id, UInt_t *buffer, UInt_t num_words)
Int_t RegisterROCNumber(const UInt_t roc_id)
Software Meantime container.
std::vector< std::vector< Double_t > > fReferenceData
static const UInt_t kMaxNumberOfModulesPerROC
void SetSystemName(const TString name)
virtual void ConstructHistograms()
Construct the histograms for this subsystem.
po::options_description_easy_init AddOptions(const std::string &blockname="Specialized options")
Add an option to a named block or create new block.
const UInt_t & GetTDCSlotNumber() const
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...
T GetValue(const std::string &key)
Get a templated value.
Int_t ProcessConfigurationBuffer(const UInt_t roc_id, const UInt_t bank_id, UInt_t *buffer, UInt_t num_words)
std::map< TString, size_t > fSCAs_map
const UInt_t & GetTDCChannelNumber() const
std::vector< Int_t > fSCAs_offset
static void DefineOptions()
Define options function (note: no virtual static functions in C++)
void DecodeTDCWord(UInt_t &word, const UInt_t roc_id=0)
void SetEventTypeMask(const UInt_t mask)
Set event type mask.
size_t fTreeArrayIndex
Tree indices.
one software meantim holder
Double_t ReferenceSignalCorrection(Double_t raw_time, Double_t ref_time, Int_t bank_index, Int_t slot)
MeanTime * GetMeanTimeObject(Int_t index)
void FillRawTDCWord(Int_t bank_index, Int_t slot_num, Int_t chan, UInt_t data)
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()
void SubtractReferenceTimes()
Bool_t WireMatches(EQwRegionID region, EQwDetectorPackage package, Int_t plane, Int_t wire)
Int_t RegisterSlotNumber(const UInt_t slot_id)
void SetTimens(const Double_t timens)
Bool_t IsValidDataword() const
The pure virtual base class of all subsystems.
std::vector< QwSIS3801D24_Channel > fSCAs
UInt_t GetCodaEventNumber() const
Get the internal record of the CODA event number.
void SetF1BankIndex(const Int_t bank_index)
void AddSoftwareMeantimeToHits(Bool_t option)
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.
void FillHardwareErrorSummary()
Hardware error summary.
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...
std::vector< QwHit > fTDCHits
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.
Int_t LinkChannelToSignal(const UInt_t chan, const TString &name)
static const Int_t kMaxNumberOfQwHitPlane
void SetPlane(const Int_t in)
Bool_t IsF1ReferenceChannel(Int_t slot, Int_t chan)
std::vector< UInt_t > fROC_IDs
Vector of ROC IDs associated with this subsystem.
void SetF1TDCIndex(const Int_t tdc_index)
QwTriggerScintillator()
Private default constructor (not implemented, will throw linker error on use)
void ConstructBranchAndVector(TTree *tree, TString &prefix, std::vector< Double_t > &values)
Construct the branch and tree vector.
Int_t LoadChannelMap(TString mapfile)
Mandatory map file definition.
QwF1TDContainer * fF1TDContainer
std::vector< std::vector< Int_t > > fModuleIndex
QwSubsystemArray * GetParent(const unsigned int parent=0) const
Get the parent of this subsystem.
Hit structure uniquely defining each hit.
UInt_t kMaxNumberOfChannelsPerF1TDC
std::vector< std::vector< std::pair< EQwModuleType, Int_t > > > fModulePtrs
static const Int_t kF1ReferenceChannelNumber
MeanTimeContainer * fSoftwareMeantimeContainer[2]
Double_t ReturnTimeCalibration(Double_t time_arb_unit)
void Print(const Option_t *options=0) const
void FillHistograms()
Fill the histograms for this subsystem.
Double_t fSoftwareMeantimeTimeWindowNs
void DecodeTDCWord(UInt_t &word, const UInt_t roc_id)
size_t fTreeArrayNumEntries
void ClearAllBankRegistrations()
Clear all registration of ROC and Bank IDs for this subsystem.
Bool_t IsSlotRegistered(Int_t bank_index, Int_t slot_num) const
#define RegisterSubsystemFactory(A)
void FillRawWord(Int_t bank_index, Int_t slot_num, Int_t chan, UInt_t data)
Bool_t fSoftwareMeantimeOption
TString GetSubsystemName() const
void SetDataLoaded(Bool_t flag)