QwAnalysis
QwMainDetector Class Reference

#include <QwMainDetector.h>

+ Inheritance diagram for QwMainDetector:
+ Collaboration diagram for QwMainDetector:

Public Member Functions

 QwMainDetector (const TString &name)
 Constructor with name. More...
 
virtual ~QwMainDetector ()
 Virtual destructor. More...
 
Int_t LoadChannelMap (TString mapfile)
 Mandatory map file definition. More...
 
Int_t LoadInputParameters (TString mapfile)
 Mandatory parameter file definition. More...
 
void ConstructHistograms (TDirectory *folder, TString &prefix)
 Construct the histograms for this subsystem in a folder with a prefix. More...
 
void FillHistograms ()
 Fill the histograms for this subsystem. More...
 
void ConstructBranchAndVector (TTree *tree, TString &prefix, std::vector< Double_t > &values)
 Construct the branch and tree vector. More...
 
void FillTreeVector (std::vector< Double_t > &values) const
 Fill the tree vector. More...
 
Int_t ProcessConfigurationBuffer (const UInt_t roc_id, const UInt_t bank_id, UInt_t *buffer, UInt_t num_words)
 
void ReportConfiguration (Bool_t verbose)
 
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 version. More...
 
void ProcessEvent ()
 
void FillRawTDCWord (Int_t bank_index, Int_t slot_num, Int_t chan, UInt_t data)
 
void FillHardwareErrorSummary ()
 Hardware error summary. More...
 
void ClearEventData ()
 
void ProcessOptions (QwOptions &options)
 Process the command line options. More...
 
void GetHitList (QwHitContainer &grandHitContainer)
 Get the hit list. More...
 
QwMainDetectoroperator= (const QwMainDetector &value)
 
- Public Member Functions inherited from VQwSubsystemTracking
 VQwSubsystemTracking (TString name)
 Constructor with name. More...
 
virtual ~VQwSubsystemTracking ()
 Default destructor. More...
 
Int_t LoadGeometryDefinition (TString mapfile)
 Load geometry definition for tracking subsystems. More...
 
Int_t LoadCrosstalkDefinition (TString mapfile)
 Load crosstalk definition for tracking subsystems. More...
 
const QwGeometryGetDetectorInfo () const
 Get the detector geometry information. More...
 
virtual void ConstructBranch (TTree *tree, TString &prefix)
 Construct the branch and tree vector. More...
 
virtual void ConstructBranch (TTree *tree, TString &prefix, QwParameterFile &trim_file)
 Construct the branch and tree vector based on the trim file. More...
 
- Public Member Functions inherited from VQwSubsystem
 VQwSubsystem (const TString &name)
 Constructor with name. More...
 
 VQwSubsystem (const VQwSubsystem &orig)
 Copy constructor by object. More...
 
virtual ~VQwSubsystem ()
 Default destructor. More...
 
TString GetSubsystemName () const
 
Bool_t HasDataLoaded () const
 
void SetParent (QwSubsystemArray *parent)
 Set the parent of this subsystem to the specified array. More...
 
QwSubsystemArrayGetParent (const unsigned int parent=0) const
 Get the parent of this subsystem. More...
 
VQwSubsystemGetSibling (const std::string &name) const
 Get the sibling with specified name. More...
 
Bool_t PublishInternalValue (const TString &name, const TString &desc, const VQwHardwareChannel *value) const
 Publish a variable name to the parent subsystem array. More...
 
virtual Bool_t PublishInternalValues () const
 Publish all variables of the subsystem. More...
 
virtual Bool_t PublishByRequest (TString device_name)
 Try to publish an internal variable matching the submitted name. More...
 
Bool_t RequestExternalValue (const TString &name, VQwHardwareChannel *value) const
 Request a named value which is owned by an external subsystem; the request will be handled by the parent subsystem array. More...
 
virtual const VQwHardwareChannelReturnInternalValue (const TString &name) const
 Return a pointer to a varialbe to the parent subsystem array to be delivered to a different subsystem. More...
 
virtual Bool_t ReturnInternalValue (const TString &name, VQwHardwareChannel *value) const
 Return a named value to the parent subsystem array to be delivered to a different subsystem. More...
 
virtual std::vector< TString > GetParamFileNameList ()
 
virtual std::map< TString,
TString > 
GetDetectorMaps ()
 
virtual Int_t LoadDetectorMaps (QwParameterFile &file)
 Parse parameter file to find the map files. More...
 
virtual Int_t LoadEventCuts (TString mapfile)
 Optional event cut file. More...
 
void SetEventTypeMask (const UInt_t mask)
 Set event type mask. More...
 
UInt_t GetEventTypeMask () const
 Get event type mask. More...
 
virtual Int_t ProcessEvBuffer (const UInt_t event_type, const UInt_t roc_id, const UInt_t bank_id, UInt_t *buffer, UInt_t num_words)
 
virtual void ExchangeProcessedData ()
 Request processed data from other subsystems for internal use in the second event processing stage. Not all derived classes will require data from other subsystems. More...
 
virtual void ProcessEvent_2 ()
 Process the event data again, including data from other subsystems. Not all derived classes will require a second stage of event data processing. More...
 
virtual void AtEndOfEventLoop ()
 Perform actions at the end of the event loop. More...
 
virtual void RandomizeEventData (int helicity=0, double time=0.0)
 
virtual void EncodeEventData (std::vector< UInt_t > &buffer)
 
virtual void PrintInfo () const
 Print some information about the subsystem. More...
 
virtual VQwSubsystemoperator= (VQwSubsystem *value)
 Assignment Note: Must be called at the beginning of all subsystems routine call to operator=(VQwSubsystem *value) by VQwSubsystem::operator=(value) More...
 
virtual void PrintDetectorMaps (Bool_t status) const
 
virtual void ConstructHistograms ()
 Construct the histograms for this subsystem. More...
 
virtual void ConstructHistograms (TDirectory *folder)
 Construct the histograms for this subsystem in a folder. More...
 
virtual void ConstructHistograms (TString &prefix)
 Construct the histograms for this subsystem with a prefix. More...
 
virtual void ConstructBranchAndVector (TTree *tree, std::vector< Double_t > &values)
 Construct the branch and tree vector. More...
 
virtual void ConstructTree ()
 Construct the tree for this subsystem. More...
 
virtual void ConstructTree (TDirectory *folder)
 Construct the tree for this subsystem in a folder. More...
 
virtual void ConstructTree (TString &prefix)
 Construct the tree for this subsystem with a prefix. More...
 
virtual void ConstructTree (TDirectory *folder, TString &prefix)
 Construct the tree for this subsystem in a folder with a prefix. More...
 
virtual void FillTree ()
 Fill the tree for this subsystem. More...
 
virtual void DeleteTree ()
 Delete the tree for this subsystem. More...
 
- Public Member Functions inherited from MQwHistograms
void ShareHistograms (const MQwHistograms *source)
 Share histogram pointers between objects. More...
 
- Public Member Functions inherited from MQwCloneable< VQwSubsystem, QwMainDetector >
virtual ~MQwCloneable ()
 Virtual destructor. More...
 
virtual VQwSubsystemClone () const
 Concrete clone method. More...
 
const VQwFactory< VQwSubsystem > * Factory () const
 Factory getter. More...
 
- Public Member Functions inherited from VQwCloneable< VQwSubsystem >
virtual ~VQwCloneable ()
 Virtual destructor. More...
 
std::string GetClassName () const
 Get demangled name of this class. More...
 

Static Public Member Functions

static void DefineOptions (QwOptions &options)
 
- Static Public Member Functions inherited from VQwSubsystem
static void DefineOptions ()
 Define options function (note: no virtual static functions in C++) More...
 
- Static Public Member Functions inherited from MQwCloneable< VQwSubsystem, QwMainDetector >
static VQwSubsystemCreate (const std::string &name)
 Object creation. More...
 
static QwMainDetectorCast (QwMainDetector *type)
 Object dynamic cast. More...
 

Protected Member Functions

void FillRawWord (Int_t bank_index, Int_t slot_num, Int_t chan, UInt_t data)
 
void ClearAllBankRegistrations ()
 
Int_t RegisterROCNumber (const UInt_t roc_id)
 
Int_t RegisterSubbank (const UInt_t bank_id)
 
Int_t RegisterSlotNumber (const UInt_t slot_id)
 
Int_t GetModuleIndex (size_t bank_index, size_t slot_num) const
 
Bool_t IsSlotRegistered (Int_t bank_index, Int_t slot_num) const
 
EQwModuleType RegisterModuleType (TString moduletype)
 
Int_t LinkChannelToSignal (const UInt_t chan, const TString &name)
 
Int_t FindSignalIndex (const EQwModuleType modtype, const TString &name) const
 
void SubtractReferenceTimes ()
 
void UpdateHits ()
 
void AddSoftwareMeantimeToHits (Bool_t option)
 
Bool_t IsF1ReferenceChannel (Int_t slot, Int_t chan)
 
- Protected Member Functions inherited from VQwSubsystem
void UpdatePublishedValue (const TString &name, VQwHardwareChannel *data_channel)
 
void ClearAllBankRegistrations ()
 Clear all registration of ROC and Bank IDs for this subsystem. More...
 
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. More...
 
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 registration. More...
 
Int_t GetSubbankIndex () const
 
Int_t GetSubbankIndex (const UInt_t roc_id, const UInt_t bank_id) const
 
void SetDataLoaded (Bool_t flag)
 
Int_t FindIndex (const std::vector< UInt_t > &myvec, const UInt_t value) const
 
Bool_t Compare (VQwSubsystem *source)
 
- Protected Member Functions inherited from MQwHistograms
 MQwHistograms ()
 Default constructor. More...
 
 MQwHistograms (const MQwHistograms &source)
 Copy constructor. More...
 
virtual ~MQwHistograms ()
 Virtual destructor. More...
 
virtual MQwHistogramsoperator= (const MQwHistograms &value)
 
void Fill_Pointer (TH1_ptr hist_ptr, Double_t value)
 
void AddHistogram (TH1 *h)
 Register a histogram. More...
 

Protected Attributes

EQwModuleType fCurrentType
 
Bool_t fDEBUG
 
Bool_t fSoftwareMeantimeOption
 
Double_t fSoftwareMeantimeTimeWindowNs
 
TString fRegion
 
Int_t fCurrentBankIndex
 Name of this subsystem (the region). More...
 
Int_t fCurrentSlot
 
Int_t fCurrentModuleIndex
 
UInt_t fBankID [3]
 
UInt_t kMaxNumberOfChannelsPerF1TDC
 
Int_t fNumberOfModules
 
MQwV775TDC fQDCTDC
 
MQwF1TDC fF1TDCDecoder
 
QwF1TDContainerfF1TDContainer
 
F1TDCReferenceContainerfF1RefContainer
 
MeanTimeContainerfSoftwareMeantimeContainer [8]
 
std::vector< QwHitfTDCHits
 
std::vector< std::vector
< QwDetectorID > > 
fDetectorIDs
 
std::vector< std::pair< Int_t,
Int_t > > 
fReferenceChannels
 
std::vector< std::vector
< Double_t > > 
fReferenceData
 
std::vector< std::vector< Int_t > > fModuleIndex
 
std::vector< EQwModuleTypefModuleTypes
 
std::vector< std::vector
< std::pair< EQwModuleType,
Int_t > > > 
fModulePtrs
 
std::vector< std::vector
< QwPMT_Channel > > 
fPMTs
 
std::vector< QwSIS3801D24_ChannelfSCAs
 
std::map< TString, size_t > fSCAs_map
 
std::vector< Int_t > fSCAs_offset
 
Int_t fRefTime_SlotNum
 
Int_t fRefTime_ChanNum
 
Double_t fRefTime
 
- Protected Attributes inherited from VQwSubsystemTracking
QwGeometry fDetectorInfo
 Geometry information of this subsystem. More...
 
size_t fTreeArrayIndex
 Tree indices. More...
 
size_t fTreeArrayNumEntries
 
Double_t fF1TDCResolutionNS
 
- Protected Attributes inherited from VQwSubsystem
std::map< TString,
VQwHardwareChannel * > 
fPublishedInternalValues
 Map of published internal values. More...
 
std::vector< std::vector
< TString > > 
fPublishList
 List of parameters to be published (loaded at the channel map) More...
 
TString fSystemName
 Name of this subsystem. More...
 
UInt_t fEventTypeMask
 Mask of event types. More...
 
Bool_t fIsDataLoaded
 Has this subsystem gotten data to be processed? More...
 
std::vector< TString > fDetectorMapsNames
 
std::map< TString, TString > fDetectorMaps
 
Int_t fCurrentROC_ID
 ROC ID that is currently being processed. More...
 
Int_t fCurrentBank_ID
 Bank ID that is currently being processed. More...
 
std::vector< UInt_t > fROC_IDs
 Vector of ROC IDs associated with this subsystem. More...
 
std::vector< std::vector
< UInt_t > > 
fBank_IDs
 Vector of Bank IDs per ROC ID associated with this subsystem. More...
 
std::vector< QwSubsystemArray * > fArrays
 Vector of pointers to subsystem arrays that contain this subsystem. More...
 
- Protected Attributes inherited from MQwHistograms
std::vector< TH1_ptrfHistograms
 Histograms associated with this data element. More...
 

Static Protected Attributes

static const UInt_t kMaxNumberOfModulesPerROC = 21
 
static const Int_t kF1ReferenceChannelNumber = 99
 
static const Int_t kMaxNumberOfQwHitPlane = 8
 

Private Member Functions

 QwMainDetector ()
 Private default constructor (not implemented, will throw linker error on use) More...
 

Detailed Description

Definition at line 38 of file QwMainDetector.h.

Constructor & Destructor Documentation

QwMainDetector::QwMainDetector ( )
private

Private default constructor (not implemented, will throw linker error on use)

QwMainDetector::QwMainDetector ( const TString &  name)

Constructor with name.

Definition at line 32 of file QwMainDetector.cc.

References ClearAllBankRegistrations(), fBankID, fCurrentBankIndex, fCurrentModuleIndex, fCurrentSlot, fDEBUG, fF1RefContainer, fF1TDCDecoder, fF1TDContainer, fNumberOfModules, fRegion, fSoftwareMeantimeContainer, fSoftwareMeantimeOption, fSoftwareMeantimeTimeWindowNs, QwF1TDContainer::GetF1TDCDecoder(), MQwF1TDC::GetTDCMaxChannels(), kMaxNumberOfChannelsPerF1TDC, kMaxNumberOfQwHitPlane, and VQwSubsystem::SetEventTypeMask().

34 {
35  SetEventTypeMask(0xffff);
36 
37  fDEBUG = false;
39 
40  fRegion = "";
42  fCurrentSlot = 0;
44 
45  fBankID[0] = 0;
46  fBankID[1] = 0;
47  fBankID[2] = 0;
48 
49  fNumberOfModules = 0;
50 
55 
56  for (Int_t plane_idx=0; plane_idx<kMaxNumberOfQwHitPlane; plane_idx++) //JAM
57  {
59  }
60 
63 }
MeanTimeContainer * fSoftwareMeantimeContainer[8]
F1TDCs configuration and reference siganls container.
const UInt_t & GetTDCMaxChannels() const
Definition: MQwF1TDC.h:50
Software Meantime container.
Int_t fCurrentBankIndex
Name of this subsystem (the region).
void SetEventTypeMask(const UInt_t mask)
Set event type mask.
Definition: VQwSubsystem.h:166
Bool_t fSoftwareMeantimeOption
static const Int_t kMaxNumberOfQwHitPlane
const MQwF1TDC GetF1TDCDecoder() const
MQwF1TDC fF1TDCDecoder
Int_t fCurrentModuleIndex
void ClearAllBankRegistrations()
VQwSubsystemTracking()
Private default constructor (not implemented, will throw linker error on use)
QwF1TDContainer * fF1TDContainer
Double_t fSoftwareMeantimeTimeWindowNs
UInt_t fBankID[3]
F1TDCReferenceContainer * fF1RefContainer
UInt_t kMaxNumberOfChannelsPerF1TDC

+ Here is the call graph for this function:

QwMainDetector::~QwMainDetector ( )
virtual

Virtual destructor.

Definition at line 65 of file QwMainDetector.cc.

References fF1RefContainer, fF1TDContainer, fPMTs, fSCAs, fSoftwareMeantimeContainer, and kMaxNumberOfQwHitPlane.

66 {
67  fPMTs.clear();
68  fSCAs.clear();
69  delete fF1TDContainer;
70  delete fF1RefContainer;
71 
72  for (Int_t plane_idx=0; plane_idx<kMaxNumberOfQwHitPlane; plane_idx++)
73  {
74  delete fSoftwareMeantimeContainer[plane_idx];
75  }
76 
77 }
MeanTimeContainer * fSoftwareMeantimeContainer[8]
static const Int_t kMaxNumberOfQwHitPlane
std::vector< QwSIS3801D24_Channel > fSCAs
QwF1TDContainer * fF1TDContainer
F1TDCReferenceContainer * fF1RefContainer
std::vector< std::vector< QwPMT_Channel > > fPMTs

Member Function Documentation

void QwMainDetector::AddSoftwareMeantimeToHits ( Bool_t  option)
protected

Definition at line 1363 of file QwMainDetector.cc.

References fSoftwareMeantimeContainer, fSoftwareMeantimeTimeWindowNs, fTDCHits, QwSubsystemArray::GetCodaEventNumber(), MeanTimeContainer::GetMeanTimeObject(), VQwSubsystem::GetParent(), MeanTime::GetPlane(), VQwSubsystem::GetSubsystemName(), kDirectionNull, kMaxNumberOfQwHitPlane, kRegionIDCer, QwHit::SetTimens(), and MeanTimeContainer::SoftwareMTSize().

Referenced by ProcessEvent().

1364 {
1365  //if option is false, end this function
1366  if( !option ) return;
1367  // if fTDCHits size is zero, end this function
1368  if ( fTDCHits.size() ==0 ) return;
1369 
1370  Bool_t local_debug = false; //local debug
1371 
1372  Long64_t ev_num = 0;
1373  Int_t plane = 0;
1374  Int_t element = 0;
1375  Int_t octant = 0;
1376  Int_t hitnumber = 0;
1377  Double_t timens = 0.0;
1378 
1379 
1380  Int_t bank_index = 0;
1381  Int_t slot_num = 0;
1382  Int_t chan_num = 0;
1383  EQwDetectorPackage package = kPackageNull;
1384  EQwDirectionID direction = kDirectionNull;
1385  EQwRegionID region = kRegionIDCer;
1386 
1387  MeanTime* md_mt_time = NULL;
1388 
1389  Int_t v_plane_idx = 0;
1390 
1391  for( std::vector<QwHit>::iterator iter=fTDCHits.begin(); iter!=fTDCHits.end(); ++iter)
1392  {
1393  plane = iter->GetPlane();
1394  if( plane ==1 || plane == 2 || plane == 3 || plane ==4 || plane == 5 || plane ==6 || plane == 7 || plane == 8 )
1395  {
1396  v_plane_idx = plane-1;
1397  element = iter->GetElement();
1398  hitnumber = iter->GetHitNumber();
1399  timens = iter->GetTimeNs();
1400  // printf("plane %d element %d hitnumber %d time %12.2lf\n", plane, element, hitnumber, timens);
1401  fSoftwareMeantimeContainer[v_plane_idx] -> Add(element, hitnumber, timens);
1402  } //end for
1403  } //end for loop JAM2
1404 
1405 
1406 
1407 
1408  // Reset bank_index, slot_num, and chan_num to -9,-99,-999
1409  // because we don't have these numbers for software meantime
1410  // and we don't need these numbers in otfer to access software meantime from QwHit
1411 
1413  bank_index = -9;
1414  slot_num = -99;
1415  chan_num = -999;
1416 
1417  for (v_plane_idx=0; v_plane_idx<kMaxNumberOfQwHitPlane; v_plane_idx++)
1418  {
1419  if(v_plane_idx%2 ==0) {
1420  package = kPackage1;
1421  } // end if
1422  else if (v_plane_idx%2 ==1) {
1423  package = kPackage2;
1424  } //end else if
1425  else {
1426  break;
1427  } //end else
1428 
1429  fSoftwareMeantimeContainer[v_plane_idx] -> SetEventId(ev_num);
1430  fSoftwareMeantimeContainer[v_plane_idx] -> SetTimeWindow(fSoftwareMeantimeTimeWindowNs);
1431  fSoftwareMeantimeContainer[v_plane_idx] -> ProcessMeanTime();
1432  plane = fSoftwareMeantimeContainer[v_plane_idx] -> GetPlane();
1433 
1434  md_mt_time = NULL;
1435 
1436  for (Int_t v_smt_idx=0; v_smt_idx < fSoftwareMeantimeContainer[v_plane_idx]->SoftwareMTSize(); v_smt_idx++)
1437  {
1438  md_mt_time = fSoftwareMeantimeContainer[v_plane_idx]->GetMeanTimeObject(v_smt_idx); //Note: this should be md_mt_time
1439  md_mt_time -> Print(local_debug);
1440 
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()
1444  );
1445  software_meantime_hit.SetTimens(md_mt_time->GetMeanTime());
1446  fTDCHits.push_back(software_meantime_hit);
1447 
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()
1451  );
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);
1455 
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()
1459  );
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);
1463 
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()
1467  );
1468  software_subtract_hit.SetTimens(md_mt_time->GetSubtractTime());
1469  fTDCHits.push_back(software_subtract_hit);
1470 
1471  }//end internal for "v_smt_idx"
1472 
1473  } //end external for "v_plane_idx"
1474 
1475 
1476  if(local_debug) {
1477 
1478  TString output = "";
1479 
1480  for(std::vector<QwHit>::iterator iter=fTDCHits.begin(); iter!=fTDCHits.end(); ++iter)
1481  {
1482 
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();
1491 
1492  output += GetSubsystemName();
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 ";
1499  output += element;
1500  output += " Hit ";
1501  output += hitnumber;
1502  output += Form(" TimeNs %+10.2f\n", timens);
1503 
1504  } //end for iter
1505 
1506  std::cout <<"Size fTDCHits " << fTDCHits.size()
1507  << " Event Number " <<ev_num << "\n" << output <<std::endl;
1508  } //end local_debug
1509 
1510  return;
1511 } //end SoftwareMeantimeToHits member function
MeanTimeContainer * fSoftwareMeantimeContainer[8]
std::vector< QwHit > fTDCHits
Int_t SoftwareMTSize() const
EQwDetectorPackage
Definition: QwTypes.h:70
EQwRegionID
Definition: QwTypes.h:16
Int_t GetPlane() const
one software meantim holder
static const Int_t kMaxNumberOfQwHitPlane
MeanTime * GetMeanTimeObject(Int_t index)
void SetTimens(const Double_t timens)
Definition: QwHit.h:123
UInt_t GetCodaEventNumber() const
Get the internal record of the CODA event number.
EQwDirectionID
Definition: QwTypes.h:41
QwSubsystemArray * GetParent(const unsigned int parent=0) const
Get the parent of this subsystem.
Hit structure uniquely defining each hit.
Definition: QwHit.h:43
Double_t fSoftwareMeantimeTimeWindowNs
TString GetSubsystemName() const
Definition: VQwSubsystem.h:93

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void QwMainDetector::ClearAllBankRegistrations ( )
protected

Definition at line 995 of file QwMainDetector.cc.

References VQwSubsystem::ClearAllBankRegistrations(), fDetectorIDs, fModuleIndex, fModulePtrs, fModuleTypes, fNumberOfModules, and fTDCHits.

Referenced by QwMainDetector().

996 {
998  fModuleIndex.clear();
999  fModulePtrs.clear();
1000  fModuleTypes.clear();
1001 
1002  fDetectorIDs.clear();
1003  fTDCHits.clear();
1004 
1005  fNumberOfModules = 0;
1006 }
std::vector< EQwModuleType > fModuleTypes
std::vector< std::vector< Int_t > > fModuleIndex
std::vector< std::vector< std::pair< EQwModuleType, Int_t > > > fModulePtrs
std::vector< QwHit > fTDCHits
std::vector< std::vector< QwDetectorID > > fDetectorIDs
void ClearAllBankRegistrations()
Clear all registration of ROC and Bank IDs for this subsystem.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void QwMainDetector::ClearEventData ( )
virtual

Implements VQwSubsystem.

Definition at line 395 of file QwMainDetector.cc.

References F1TDCReferenceContainer::ClearEventData(), fF1RefContainer, fPMTs, fReferenceData, fSCAs, fSoftwareMeantimeContainer, fTDCHits, kMaxNumberOfQwHitPlane, and VQwSubsystem::SetDataLoaded().

396 {
397  SetDataLoaded(kFALSE);
398 
399 
400  fTDCHits.clear();
401  std::size_t i = 0;
402 
404 
405  //Added by JAM 2012-03-13
406  for (Int_t plane_idx=0; plane_idx<kMaxNumberOfQwHitPlane; plane_idx++)
407  {
409  }
410 
411 
412  for (i=0; i<fReferenceData.size(); i++) {
413  fReferenceData.at(i).clear();
414  }
415 
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);
419  }
420  }
421 
422  for (size_t i=0; i<fSCAs.size(); i++) {
423  fSCAs.at(i).ClearEventData();
424  }
425  return;
426 }
MeanTimeContainer * fSoftwareMeantimeContainer[8]
std::vector< std::vector< Double_t > > fReferenceData
std::vector< QwHit > fTDCHits
static const Int_t kMaxNumberOfQwHitPlane
std::vector< QwSIS3801D24_Channel > fSCAs
F1TDCReferenceContainer * fF1RefContainer
std::vector< std::vector< QwPMT_Channel > > fPMTs
void SetDataLoaded(Bool_t flag)
Definition: VQwSubsystem.h:305

+ Here is the call graph for this function:

void QwMainDetector::ConstructBranchAndVector ( TTree *  tree,
TString &  prefix,
std::vector< Double_t > &  values 
)
virtual

Construct the branch and tree vector.

Reimplemented from VQwSubsystemTracking.

Definition at line 900 of file QwMainDetector.cc.

References fPMTs, fSCAs, VQwSubsystemTracking::fTreeArrayIndex, and VQwSubsystemTracking::fTreeArrayNumEntries.

901 {
902  fTreeArrayIndex = values.size();
903 
904  TString basename;
905  if (prefix=="") basename = "maindet";
906  else basename = prefix;
907 
908  TString element_name = "";
909 
910  TString list = "";
911 
912  for (size_t i=0; i<fPMTs.size(); i++)
913  {
914  for (size_t j=0; j<fPMTs.at(i).size(); j++)
915  {
916  element_name = fPMTs.at(i).at(j).GetElementName();
917  if (element_name!="") {
918  values.push_back(0.0);
919  list += ":" + element_name + "/D";
920  //std::cout<<"Added to list: "<<fPMTs.at(i).at(j).GetElementName()<<"\n"<<std::endl;
921  }
922  }
923  }
924 
925  element_name = "";
926 
927  for (size_t i=0; i<fSCAs.size(); i++)
928  {
929  element_name = fSCAs.at(i).GetElementName();
930  if (element_name != "") {
931  values.push_back(0.0);
932  list += ":" + element_name + "/D";
933  }
934  }
935 
936  if (list[0]==':') {
937  list = list(1,list.Length()-1);
938  }
939 
940  fTreeArrayNumEntries = values.size() - fTreeArrayIndex;
941  tree->Branch(basename, &values[fTreeArrayIndex], list);
942  // std::cout<<list<<"\n";
943  return;
944 }
size_t fTreeArrayIndex
Tree indices.
std::vector< QwSIS3801D24_Channel > fSCAs
std::vector< std::vector< QwPMT_Channel > > fPMTs
void QwMainDetector::ConstructHistograms ( TDirectory *  folder,
TString &  prefix 
)
virtual

Construct the histograms for this subsystem in a folder with a prefix.

Implements VQwSubsystem.

Definition at line 865 of file QwMainDetector.cc.

References fPMTs, and fSCAs.

866 {
867  for (size_t i=0; i<fPMTs.size(); i++)
868  {
869  for (size_t j=0; j<fPMTs.at(i).size(); j++)
870  {
871  fPMTs.at(i).at(j).ConstructHistograms(folder, prefix);
872  }
873  }
874 
875  for (size_t i=0; i<fSCAs.size(); i++)
876  {
877  fSCAs.at(i).ConstructHistograms(folder, prefix);
878  }
879 
880 }
std::vector< QwSIS3801D24_Channel > fSCAs
std::vector< std::vector< QwPMT_Channel > > fPMTs
void QwMainDetector::DefineOptions ( QwOptions options)
static

Definition at line 842 of file QwMainDetector.cc.

References QwOptions::AddOptions(), and default_bool_value.

843 {
844  options.AddOptions()("enable-md-software-meantime",
845  po::value<Bool_t>()->default_bool_value(true),
846  "Create Software meantime for MD in QwHits"
847  );
848  options.AddOptions()("set-md-software-meantime-timewindow",
849  po::value<Double_t>()->default_value(50.0),
850  "TimeWindow (ns) for MD Software meantime"
851  );//max window is 2000 ns
852 
853  return;
854 };
#define default_bool_value(b)
Definition: QwOptions.h:51
po::options_description_easy_init AddOptions(const std::string &blockname="Specialized options")
Add an option to a named block or create new block.
Definition: QwOptions.h:164

+ Here is the call graph for this function:

void QwMainDetector::FillHardwareErrorSummary ( )
virtual

Hardware error summary.

Reimplemented from VQwSubsystemTracking.

Definition at line 1544 of file QwMainDetector.cc.

References fF1RefContainer, and fF1TDContainer.

1545 {
1546  fF1RefContainer -> PrintCounters();
1547  fF1TDContainer -> PrintErrorSummary();
1548  fF1TDContainer -> WriteErrorSummary();
1549  return;
1550 };
QwF1TDContainer * fF1TDContainer
F1TDCReferenceContainer * fF1RefContainer
void QwMainDetector::FillHistograms ( )
virtual

Fill the histograms for this subsystem.

Implements VQwSubsystem.

Definition at line 882 of file QwMainDetector.cc.

References fPMTs, fSCAs, and VQwSubsystem::HasDataLoaded().

883 {
884  if (! HasDataLoaded()) return;
885  for (size_t i=0; i<fPMTs.size(); i++)
886  {
887  for (size_t j=0; j<fPMTs.at(i).size(); j++)
888  {
889  fPMTs.at(i).at(j).FillHistograms();
890  }
891  }
892 
893  for (size_t i=0; i<fSCAs.size(); i++)
894  {
895  fSCAs.at(i).FillHistograms();
896  }
897 }
Bool_t HasDataLoaded() const
Definition: VQwSubsystem.h:94
std::vector< QwSIS3801D24_Channel > fSCAs
std::vector< std::vector< QwPMT_Channel > > fPMTs

+ Here is the call graph for this function:

void QwMainDetector::FillRawTDCWord ( Int_t  bank_index,
Int_t  slot_num,
Int_t  chan,
UInt_t  data 
)

Definition at line 1142 of file QwMainDetector.cc.

References fDetectorIDs, fF1RefContainer, fReferenceData, fTDCHits, GetModuleIndex(), kDirectionNull, kF1ReferenceChannelNumber, kRegionIDCer, F1TDCReferenceContainer::SetReferenceSignal(), and QwHit::WireMatches().

Referenced by ProcessEvBuffer().

1146 {
1147  Bool_t local_debug = false;
1148  Int_t tdcindex = 0;
1149 
1150  tdcindex = GetModuleIndex(bank_index,slot_num);
1151 
1152 
1153  // I think, it is not necessary, but is just "safe" double check routine.
1154  if (tdcindex not_eq -1) {
1155 
1156  Int_t hitcnt = 0;
1157 
1158  EQwDirectionID direction = kDirectionNull;
1159 
1160  TString name = "";
1161 
1162 
1163  fF1RefContainer->SetReferenceSignal(bank_index, slot_num, chan, data, local_debug);
1164 
1165  // MD1(8) plane 1(8)
1166  Int_t plane = fDetectorIDs.at(tdcindex).at(chan).fPlane;
1167  // p is element 1, and m is element 2
1168  Int_t element = fDetectorIDs.at(tdcindex).at(chan).fElement;
1169  Int_t octant = fDetectorIDs.at(tdcindex).at(chan).fOctant;
1170  EQwDetectorPackage package = fDetectorIDs.at(tdcindex).at(chan).fPackage;
1171 
1172 
1173  if(local_debug) {
1174  printf("tdcindx %d bank_idx %d, slot %d, plane %d, element %d, package %d\n",
1175  tdcindex,
1176  bank_index, slot_num, (Int_t) plane, (Int_t) element, (Int_t) package);
1177  }
1178 
1179  if (plane == -1 or element == -1){
1180  // This channel is not connected to anything. Do nothing.
1181  }
1182  else if (plane == kF1ReferenceChannelNumber){
1183  fReferenceData.at(element).push_back(data);
1184  // we assign the reference time into fReferenceData according the module index
1185  // See LocalChannelMap
1186  // if(local_debug) {
1187  // std::cout << "At QwMainDetector::FillRawTDCWord "
1188  // << " bank index " << bank_index
1189  // << " slot num " << slot_num
1190  // << " chan num " << chan
1191  // << " hitcnt " << 0
1192  // << " plane " << plane
1193  // << " wire " << element
1194  // << " package " << package
1195  // << " diection " << direction
1196  // << " data " << data
1197  // << " fTDCHits.size() " << 0
1198  // << std::endl;
1199  // }
1200  }
1201  else {
1202  direction = fDetectorIDs.at(tdcindex).at(chan).fDirection;
1203 
1204  hitcnt = std::count_if(fTDCHits.begin(), fTDCHits.end(),
1205  boost::bind(
1206  &QwHit::WireMatches, _1, kRegionIDCer, boost::ref(package), boost::ref(plane), boost::ref(element)
1207  )
1208  );
1209 
1210  if(local_debug) {
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
1220  << " data " << data
1221  << " fTDCHits.size() " << fTDCHits.size()
1222  << std::endl;
1223  }
1224 
1225  fTDCHits.push_back(
1226  QwHit(
1227  bank_index,
1228  slot_num,
1229  chan,
1230  hitcnt,
1231  kRegionIDCer,
1232  package,
1233  octant,
1234  plane,
1235  direction,
1236  element,
1237  data
1238  )
1239  );
1240 
1241 
1242  }
1243 
1244  // }
1245  } // (tdcindex not_eq -1) {
1246 
1247  return;
1248 }
std::vector< std::vector< Double_t > > fReferenceData
std::vector< QwHit > fTDCHits
EQwDetectorPackage
Definition: QwTypes.h:70
static const Int_t kF1ReferenceChannelNumber
Int_t GetModuleIndex(size_t bank_index, size_t slot_num) const
void SetReferenceSignal(Int_t bank_index, Int_t slot, Int_t chan, UInt_t data, Bool_t debug=false)
Bool_t WireMatches(EQwRegionID region, EQwDetectorPackage package, Int_t plane, Int_t wire)
Definition: QwHit.cc:357
EQwDirectionID
Definition: QwTypes.h:41
Hit structure uniquely defining each hit.
Definition: QwHit.h:43
std::vector< std::vector< QwDetectorID > > fDetectorIDs
F1TDCReferenceContainer * fF1RefContainer

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void QwMainDetector::FillRawWord ( Int_t  bank_index,
Int_t  slot_num,
Int_t  chan,
UInt_t  data 
)
protected

Definition at line 1116 of file QwMainDetector.cc.

References fModulePtrs, fPMTs, GetModuleIndex(), and kUnknownModuleType.

Referenced by ProcessEvBuffer().

1119 {
1120  Int_t modindex = GetModuleIndex(bank_index,slot_num);
1121 
1122  if (modindex != -1)
1123  {
1124  EQwModuleType modtype = fModulePtrs.at(modindex).at(chan).first;
1125  Int_t chanindex = fModulePtrs.at(modindex).at(chan).second;
1126 
1127  if (modtype == kUnknownModuleType || chanindex == -1)
1128  {
1129  // This channel is not connected to anything.
1130  // Do nothing.
1131  }
1132  else
1133  {
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);
1137  }
1138  }
1139 }
std::vector< std::vector< std::pair< EQwModuleType, Int_t > > > fModulePtrs
Int_t GetModuleIndex(size_t bank_index, size_t slot_num) const
EQwModuleType
Definition: QwTypes.h:148
std::vector< std::vector< QwPMT_Channel > > fPMTs

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void QwMainDetector::FillTreeVector ( std::vector< Double_t > &  values) const
virtual

Fill the tree vector.

Reimplemented from VQwSubsystemTracking.

Definition at line 947 of file QwMainDetector.cc.

References fPMTs, fSCAs, VQwSubsystemTracking::fTreeArrayIndex, and VQwSubsystem::HasDataLoaded().

948 {
949  if (! HasDataLoaded()) return;
950 
951  Int_t index = fTreeArrayIndex;
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();
956  index++;
957  }
958  }
959  }
960 
961  for (size_t i=0; i<fSCAs.size(); i++) {
962  if (fSCAs.at(i).GetElementName() != "") {
963  values[index] = fSCAs.at(i).GetValue();
964  index++;
965  }
966  }
967 
968  return;
969 }
Bool_t HasDataLoaded() const
Definition: VQwSubsystem.h:94
size_t fTreeArrayIndex
Tree indices.
std::vector< QwSIS3801D24_Channel > fSCAs
std::vector< std::vector< QwPMT_Channel > > fPMTs

+ Here is the call graph for this function:

Int_t QwMainDetector::FindSignalIndex ( const EQwModuleType  modtype,
const TString &  name 
) const
protected

Definition at line 1529 of file QwMainDetector.cc.

References fPMTs.

Referenced by LoadChannelMap().

1530 {
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()) {
1535  chanindex = chan;
1536  break;
1537  }
1538  }
1539  }
1540  return chanindex;
1541 }
std::vector< std::vector< QwPMT_Channel > > fPMTs

+ Here is the caller graph for this function:

void QwMainDetector::GetHitList ( QwHitContainer grandHitContainer)
inlinevirtual

Get the hit list.

Implements VQwSubsystemTracking.

Definition at line 81 of file QwMainDetector.h.

References QwHitContainer::Append(), and fTDCHits.

81  {
82  grandHitContainer.Append(fTDCHits);
83  };
std::vector< QwHit > fTDCHits
void Append(const QwHitContainer &mylist)

+ Here is the call graph for this function:

Int_t QwMainDetector::GetModuleIndex ( size_t  bank_index,
size_t  slot_num 
) const
protected

Definition at line 1516 of file QwMainDetector.cc.

References fModuleIndex.

Referenced by FillRawTDCWord(), FillRawWord(), IsSlotRegistered(), ProcessConfigurationBuffer(), ProcessEvBuffer(), and ReportConfiguration().

1517 {
1518  Int_t modindex = -1;
1519 
1520  if ( bank_index < fModuleIndex.size()) {
1521  if ( slot_num < fModuleIndex.at(bank_index).size()) {
1522  modindex = fModuleIndex.at(bank_index).at(slot_num);
1523  }
1524  }
1525  return modindex;
1526 }
std::vector< std::vector< Int_t > > fModuleIndex

+ Here is the caller graph for this function:

Bool_t QwMainDetector::IsF1ReferenceChannel ( Int_t  slot,
Int_t  chan 
)
inlineprotected

Definition at line 172 of file QwMainDetector.h.

References fRefTime_ChanNum, and fRefTime_SlotNum.

Referenced by ProcessEvBuffer().

172  {
173  return ( slot == fRefTime_SlotNum && chan == fRefTime_ChanNum) ;
174  };

+ Here is the caller graph for this function:

Bool_t QwMainDetector::IsSlotRegistered ( Int_t  bank_index,
Int_t  slot_num 
) const
inlineprotected

Definition at line 131 of file QwMainDetector.h.

References GetModuleIndex().

Referenced by ProcessEvBuffer().

131  {
132  return (GetModuleIndex(bank_index,slot_num) != -1);
133  };
Int_t GetModuleIndex(size_t bank_index, size_t slot_num) const

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Int_t QwMainDetector::LinkChannelToSignal ( const UInt_t  chan,
const TString &  name 
)
protected

Definition at line 1107 of file QwMainDetector.cc.

References fCurrentModuleIndex, fCurrentType, fModulePtrs, and fPMTs.

Referenced by LoadChannelMap().

1108 {
1109  fPMTs.at(fCurrentType).push_back(QwPMT_Channel(name));
1110  fModulePtrs.at(fCurrentModuleIndex).at(chan).first = fCurrentType;
1111  fModulePtrs.at(fCurrentModuleIndex).at(chan).second = fPMTs.at(fCurrentType).size()-1;
1112 
1113  return 0;
1114 }
std::vector< std::vector< std::pair< EQwModuleType, Int_t > > > fModulePtrs
EQwModuleType fCurrentType
Int_t fCurrentModuleIndex
std::vector< std::vector< QwPMT_Channel > > fPMTs

+ Here is the caller graph for this function:

Int_t QwMainDetector::LoadChannelMap ( TString  mapfile)
virtual

Mandatory map file definition.

Implements VQwSubsystem.

Definition at line 79 of file QwMainDetector.cc.

References fBankID, fCurrentBankIndex, fCurrentModuleIndex, fCurrentType, fDetectorIDs, VQwSubsystem::fDetectorMaps, fF1RefContainer, FindSignalIndex(), fModuleIndex, fModulePtrs, fReferenceChannels, fRefTime_ChanNum, fRefTime_SlotNum, fSCAs, fSCAs_map, fSCAs_offset, QwParameterFile::GetUInt(), kDirectionNull, kF1ReferenceChannelNumber, kRegionIDCer, kUnknownModuleType, LinkChannelToSignal(), RegisterModuleType(), RegisterROCNumber(), RegisterSlotNumber(), RegisterSubbank(), and ReportConfiguration().

80 {
81 
82  TString varname = "";
83  TString varvalue = "";
84  UInt_t value = 0;
85 
86  TString modtype = "";
87  TString dettype = "";
88  TString name = "";
89 
90  Int_t modnum = 0;
91  Int_t channum = 0;
92  Int_t slotnum = 0;
93 
94  Int_t ts_chan_num_to_plane = 0;
95  Int_t ts_chan_type_to_element = 0;
96 
97 
98  // package
99  // u -> u
100  // d -> d
101  //
102  // plane
103  // MD1 -> 1
104  // MD2 -> 2
105  // MD3 -> 3
106  // MD4 -> 4
107  // MD5 -> 5
108  // MD6 -> 6
109  // MD7 -> 7
110  // MD8 -> 8
111  //
112  // element
113  // p -> 1
114  // m -> 2
115  //
116 
117 
118  Bool_t local_debug = false;
119  Int_t reference_counter = 0;
120 
121  EQwDetectorPackage package = kPackageNull;
122  EQwDirectionID direction = kDirectionNull;
123 
124 
125  QwParameterFile mapstr(mapfile.Data()); //Open the file
126  fDetectorMaps.insert(mapstr.GetParamFileNameContents());
127 
128  while (mapstr.ReadNextLine())
129  {
130  mapstr.TrimComment('!'); // Remove everything after a '!' character.
131  mapstr.TrimWhitespace(); // Get rid of leading and trailing spaces.
132  if (mapstr.LineIsEmpty()) continue;
133 
134  if (mapstr.HasVariablePair("=",varname,varvalue))
135  {
136  // This is a declaration line. Decode it.
137  varname.ToLower();
138  value = QwParameterFile::GetUInt(varvalue);
139  if (varname=="roc")
140  {
141  RegisterROCNumber(value);
142  }
143  else if (varname=="qdc_bank")
144  {
145  RegisterSubbank(value);
146  fBankID[0] = value;
147  }
148  else if (varname=="sca_bank")
149  {
150  RegisterSubbank(value);
151  fBankID[1] = value;
152  }
153  else if (varname=="f1tdc_bank")
154  {
155  RegisterSubbank(value);
156  fBankID[2] = value;
157  }
158  else if (varname=="slot")
159  {
160  RegisterSlotNumber(value);
161  slotnum=value;
162  }
163  }
164  else
165  {
166  // Break this line into tokens to process it.
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>();
172 
173  if (local_debug) printf("%8s, %d, %d %s, %s\n", modtype.Data(), modnum, channum, dettype.Data(), name.Data());
174 
175  // Push a new record into the element array
176  if (modtype=="SIS3801") {
177 
178  QwSIS3801D24_Channel localchannel(name);
179  localchannel.SetNeedsExternalClock(kFALSE);
180  fSCAs.push_back(localchannel);
181  fSCAs_map[name] = fSCAs.size()-1;
182  fSCAs_offset.push_back(QwSIS3801D24_Channel::GetBufferOffset(modnum,channum));
183 
184  fDetectorIDs.at(fCurrentModuleIndex).at(channum).fRegion = kRegionIDCer;
185  fDetectorIDs.at(fCurrentModuleIndex).at(channum).fPackage = package;
186  fDetectorIDs.at(fCurrentModuleIndex).at(channum).fPlane = 0;
187  fDetectorIDs.at(fCurrentModuleIndex).at(channum).fDirection = direction;
188  fDetectorIDs.at(fCurrentModuleIndex).at(channum).fElement = 0;
189  }
190  else if (modtype=="V792" ) {// || modtype=="V775" || modtype=="F1TDC")
191  RegisterModuleType(modtype);
192  // Check to see if we've encountered this channel or name yet
193  if (fModulePtrs.at(fCurrentModuleIndex).at(channum).first != kUnknownModuleType) {
194  // We've seen this channel
195  }
196  else if (FindSignalIndex(fCurrentType, name) >= 0){
197  // We've seen this signal
198  }
199  else {
200  // If not, push a new record into the element array
201  // if (modtype=="V792") std::cout<<"V792: ";
202  // else if (modtype=="V775") std::cout<<"V775: ";
203  // else if (modtype=="F1TDC") std::cout<<"F1TDC: ";
204  LinkChannelToSignal(channum, name);
205  }
206  fDetectorIDs.at(fCurrentModuleIndex).at(channum).fRegion = kRegionIDCer;
207  fDetectorIDs.at(fCurrentModuleIndex).at(channum).fPackage = package;
208  fDetectorIDs.at(fCurrentModuleIndex).at(channum).fPlane = 0;
209  fDetectorIDs.at(fCurrentModuleIndex).at(channum).fDirection = direction;
210  fDetectorIDs.at(fCurrentModuleIndex).at(channum).fElement = 0;
211  }
212  else if( modtype=="F1TDC") {
213 
214  RegisterModuleType(modtype);
215  // Check to see if we've encountered this channel or name yet
216  if (fModulePtrs.at(fCurrentModuleIndex).at(channum).first != kUnknownModuleType) {
217  // We've seen this channel
218  } else if (FindSignalIndex(fCurrentType, name)>=0) {
219  // We've seen this signal
220  } else {
221  // If not, push a new record into the element array
222  LinkChannelToSignal(channum, name);
223  }
224 
225 
226 
227  if (name=="md_reftime_f1") {
228 
229  fF1RefContainer -> AddF1TDCReferenceSignal(new F1TDCReferenceSignal(fCurrentBankIndex, slotnum, channum, "MasterTrigger"));
230 
231  fRefTime_SlotNum = slotnum;
232  fRefTime_ChanNum = channum;
233  reference_counter++;
234  // printf("bank index %d Chan %d reference_counter %d\n", fCurrentBankIndex, channum, reference_counter);
236  fReferenceChannels.at ( fCurrentBankIndex ).second = channum;
237 
238  package = kPackageNull;
239 
240  fDetectorIDs.at(fCurrentModuleIndex).at(channum).fElement = fCurrentBankIndex;
242 
243  }
244  else {
245  if (name=="md1m_f1") {
246  ts_chan_num_to_plane = 1;
247  ts_chan_type_to_element = 2;
248  package = kPackage1;
249  }
250  else if (name=="md2m_f1") {
251  ts_chan_num_to_plane = 2;
252  ts_chan_type_to_element = 2;
253  package = kPackage2;
254  }
255  else if (name=="md3m_f1") {
256  ts_chan_num_to_plane = 3;
257  ts_chan_type_to_element = 2;
258  package = kPackage1;
259  }
260  else if (name=="md4m_f1") {
261  ts_chan_num_to_plane = 4;
262  ts_chan_type_to_element = 2;
263  package = kPackage2;
264  }
265  else if (name=="md5m_f1") {
266  ts_chan_num_to_plane = 5;
267  ts_chan_type_to_element = 2;
268  package = kPackage1;
269  }
270  else if (name=="md6m_f1") {
271  ts_chan_num_to_plane = 6;
272  ts_chan_type_to_element = 2;
273  package = kPackage2;
274  }
275  else if (name=="md7m_f1") {
276  ts_chan_num_to_plane = 7;
277  ts_chan_type_to_element = 2;
278  package = kPackage1;
279  }
280  else if (name=="md8m_f1") {
281  ts_chan_num_to_plane = 8;
282  ts_chan_type_to_element = 2;
283  package = kPackage2;
284  }
285  else if (name=="md1p_f1") {
286  ts_chan_num_to_plane = 1;
287  ts_chan_type_to_element = 1;
288  package = kPackage1;
289  }
290  else if (name=="md2p_f1") {
291  ts_chan_num_to_plane = 2;
292  ts_chan_type_to_element = 1;
293  package = kPackage2;
294  }
295  else if (name=="md3p_f1") {
296  ts_chan_num_to_plane = 3;
297  ts_chan_type_to_element = 1;
298  package = kPackage1;
299  }
300  else if (name=="md4p_f1") {
301  ts_chan_num_to_plane = 4;
302  ts_chan_type_to_element = 1;
303  package = kPackage2;
304  }
305  else if (name=="md5p_f1") {
306  ts_chan_num_to_plane = 5;
307  ts_chan_type_to_element = 1;
308  package = kPackage1;
309  }
310  else if (name=="md6p_f1") {
311  ts_chan_num_to_plane = 6;
312  ts_chan_type_to_element = 1;
313  package = kPackage2;
314  }
315  else if (name=="md7p_f1") {
316  ts_chan_num_to_plane = 7;
317  ts_chan_type_to_element = 1;
318  package = kPackage1;
319  }
320  else if (name=="md8p_f1") {
321  ts_chan_num_to_plane = 8;
322  ts_chan_type_to_element = 1;
323  package = kPackage2;
324  }
325  else {
326  ts_chan_num_to_plane = -1;
327  ts_chan_type_to_element = -1;
328  package = kPackageNull;
329  }
330 
331 
332  fDetectorIDs.at(fCurrentModuleIndex).at(channum).fElement = ts_chan_type_to_element;
333  fDetectorIDs.at(fCurrentModuleIndex).at(channum).fPlane = ts_chan_num_to_plane;
334 
335  }
336 
337  fDetectorIDs.at(fCurrentModuleIndex).at(channum).fRegion = kRegionIDCer;
338  fDetectorIDs.at(fCurrentModuleIndex).at(channum).fPackage = package;
339  fDetectorIDs.at(fCurrentModuleIndex).at(channum).fDirection = direction;
340 
341  }
342  else {
343  std::cerr << "LoadChannelMap: Unknown line: " << mapstr.GetLine().c_str() << std::endl;
344  }
345  }
346  }
347 
348  if(local_debug) {
349 
350 
351  Int_t unused_size_counter = 0;
352  std::size_t i = 0;
353 
354  for( i = 0; i < fModuleIndex.size(); i++)
355  {
356  for(size_t slot_size =0; slot_size < fModuleIndex.at(i).size(); slot_size++)
357  {
358  Int_t m_idx = 0;
359  m_idx = fModuleIndex.at(i).at(slot_size);
360  if(m_idx != -1 ) {
361  std::cout << "[" << i <<","<< slot_size << "] "
362  << " module index " << m_idx
363  << std::endl;
364  }
365  else {
366  unused_size_counter++;
367  }
368  }
369  }
370  // why the bank index is always odd number?
371  //
372 
373  printf("Total unused size of fModuleIndex vector %6d\n", unused_size_counter);
374 
375  for(i = 0; i < fReferenceChannels.size(); i++)
376  {
377  std::cout << "[" << i <<"] "
378  << " fRerenceChannel " << fReferenceChannels.at(i).first
379  << " " << fReferenceChannels.at(i).second
380  << std::endl;
381  }
382 
383  printf("\n------------- MD LoadChannelMap End%s\n\n", mapfile.Data());
384 
385  }
386 
387  ReportConfiguration(local_debug);
388 
389  mapstr.Close(); // Close the file (ifstream)
390  //ReportConfiguration();
391  return 0;
392 }
std::map< TString, TString > fDetectorMaps
Definition: VQwSubsystem.h:322
std::vector< std::vector< Int_t > > fModuleIndex
std::vector< std::vector< std::pair< EQwModuleType, Int_t > > > fModulePtrs
void ReportConfiguration(Bool_t verbose)
Int_t RegisterSlotNumber(const UInt_t slot_id)
static UInt_t GetUInt(const TString &varvalue)
EQwDetectorPackage
Definition: QwTypes.h:70
Int_t fCurrentBankIndex
Name of this subsystem (the region).
Int_t FindSignalIndex(const EQwModuleType modtype, const TString &name) const
static const Int_t kF1ReferenceChannelNumber
Int_t LinkChannelToSignal(const UInt_t chan, const TString &name)
Int_t RegisterSubbank(const UInt_t bank_id)
class QwScaler_Channel< 0x00ffffff, 0 > QwSIS3801D24_Channel
EQwModuleType fCurrentType
EQwDirectionID
Definition: QwTypes.h:41
Int_t fCurrentModuleIndex
std::vector< QwSIS3801D24_Channel > fSCAs
Int_t RegisterROCNumber(const UInt_t roc_id)
std::vector< std::pair< Int_t, Int_t > > fReferenceChannels
EQwModuleType RegisterModuleType(TString moduletype)
std::vector< Int_t > fSCAs_offset
UInt_t fBankID[3]
std::map< TString, size_t > fSCAs_map
std::vector< std::vector< QwDetectorID > > fDetectorIDs
F1TDCReferenceContainer * fF1RefContainer

+ Here is the call graph for this function:

Int_t QwMainDetector::LoadInputParameters ( TString  mapfile)
inlinevirtual

Mandatory parameter file definition.

Implements VQwSubsystem.

Definition at line 56 of file QwMainDetector.h.

56 {return 0;};
QwMainDetector & QwMainDetector::operator= ( const QwMainDetector value)

Definition at line 972 of file QwMainDetector.cc.

References fPMTs.

973 {
974  if (fPMTs.size() == value.fPMTs.size())
975  {
976  for (size_t i=0; i<fPMTs.size(); i++)
977  {
978  for (size_t j=0; j<fPMTs.at(i).size(); j++)
979  {
980  fPMTs.at(i).at(j) = value.fPMTs.at(i).at(j);
981  }
982  }
983  }
984  else
985  {
986  std::cerr << "QwMainDetector::operator=: Problems!!!"
987  << std::endl;
988  }
989  return *this;
990 }
std::vector< std::vector< QwPMT_Channel > > fPMTs
Int_t QwMainDetector::ProcessConfigurationBuffer ( const UInt_t  roc_id,
const UInt_t  bank_id,
UInt_t *  buffer,
UInt_t  num_words 
)
virtual

Implements VQwSubsystem.

Definition at line 430 of file QwMainDetector.cc.

References QwF1TDContainer::AddQwF1TDC(), QwF1TDContainer::DoneF1TDCsConfiguration(), fBankID, fF1RefContainer, fF1TDContainer, VQwSubsystemTracking::fF1TDCResolutionNS, fSoftwareMeantimeContainer, GetModuleIndex(), VQwSubsystem::GetSubbankIndex(), VQwSubsystem::GetSubsystemName(), kMaxNumberOfModulesPerROC, kMaxNumberOfQwHitPlane, QwF1TDContainer::Print(), QwF1TDC::SetF1BankIndex(), QwF1TDC::SetF1SystemName(), QwF1TDC::SetF1TDCBuffer(), QwF1TDC::SetF1TDCIndex(), MeanTimeContainer::SetPlane(), and MeanTimeContainer::SetSystemName().

431 {
432 
433 
434  if( bank_id==fBankID[2] ) {
435 
436  TString subsystem_name;
437 
438  Int_t bank_index = 0;
439  Int_t tdc_index = 0;
440  UInt_t slot_id = 0;
441  UInt_t vme_slot_num = 0;
442 
443  Bool_t local_debug = false;
444 
445  QwF1TDC *local_f1tdc = NULL;
446 
447  bank_index = GetSubbankIndex(roc_id, bank_id);
448 
449  if(bank_index >=0) {
450  if(local_debug) {
451  std::cout << "fF1TDContainer " << fF1TDContainer
452  <<" local_f1tdc " << local_f1tdc << "\n";
453  }
454  subsystem_name = this->GetSubsystemName();
455  fF1TDContainer -> SetSystemName(subsystem_name);
456  fF1RefContainer-> SetSystemName(subsystem_name);
457 
458  for (Int_t plane_idx=0; plane_idx<kMaxNumberOfQwHitPlane; plane_idx++)
459  {
460  fSoftwareMeantimeContainer[plane_idx]->SetSystemName(subsystem_name);
461  fSoftwareMeantimeContainer[plane_idx]->SetPlane(plane_idx+1);
462  } //JAM
463 
464  if(local_debug) std::cout << "-----------------------------------------------------" << std::endl;
465 
466  std::cout << "QwMainDetector : "
467  << subsystem_name
468  << ", "
469  << "ProcessConfigurationBuffer"
470  << std::endl;
471  std::cout << "ROC "
472  << std::setw(2) << roc_id
473  << " Bank [index,id]["
474  << bank_index
475  << ","
476  << bank_id
477  << "]"
478  << std::endl;
479  for ( slot_id=0; slot_id<kMaxNumberOfModulesPerROC; slot_id++ ) {
480  // slot id starts from 2, because 0 is one offset (1) difference between QwAnalyzer and VME definition,
481  // and 1 and 2 are used for CPU and TI. Tuesday, August 31 10:57:07 EDT 2010, jhlee
482 
483  tdc_index = GetModuleIndex(bank_index, slot_id);
484  vme_slot_num = slot_id;
485 
486  if(local_debug) {
487  std::cout << " "
488  << "Slot [id, VME num] ["
489  << std::setw(2) << slot_id
490  << ","
491  << std::setw(2) << vme_slot_num
492  << "]";
493  std::cout << " ";
494  }
495 
496 
497  local_f1tdc = NULL;
498 
499  if(slot_id > 2) { // save time
500 
501  if (tdc_index not_eq -1) {
502 
503  if(local_f1tdc) delete local_f1tdc; local_f1tdc = 0;
504 
505  local_f1tdc = new QwF1TDC(roc_id, vme_slot_num);
506 
507  local_f1tdc->SetF1BankIndex(bank_index);
508  local_f1tdc->SetF1TDCIndex(tdc_index);
509  local_f1tdc->SetF1TDCBuffer(buffer, num_words);
510  local_f1tdc->SetF1SystemName(subsystem_name);
511 
512  fF1TDContainer->AddQwF1TDC(local_f1tdc);
513 
514  if(local_debug) {
515  std::cout << "F1TDC index "
516  << std::setw(2)
517  << tdc_index
518  << std::setw(16)
519  << " local_f1tdc "
520  << *local_f1tdc
521  << " at "
522  << local_f1tdc;
523  }
524 
525  }
526  else {
527 
528  if(local_debug) {
529  std::cout << "Unused in "
530  << std::setw(4)
531  << subsystem_name
532  << std::setw(16)
533  << " local_f1tdc at "
534  << local_f1tdc;
535  }
536 
537  }
538 
539  }
540  else { // slot_id == only 0, 1, & 2
541 
542  if(local_debug) {
543  if (slot_id == 0) std::cout << " ";
544  else if (slot_id == 1) std::cout << "MVME CPU ";
545  else std::cout << "Trigger Interface"; // slot_id == 2;
546  }
547 
548  }
549 
550  if(local_debug) std::cout << std::endl;
551  }
552 
554 
555  if(local_debug) {
557  std::cout << "-----------------------------------------------------" << std::endl;
558  }
559  }
560  }
561  return 0;
562 }
Int_t GetSubbankIndex() const
Definition: VQwSubsystem.h:303
void AddQwF1TDC(QwF1TDC *in)
MeanTimeContainer * fSoftwareMeantimeContainer[8]
void SetF1TDCBuffer(UInt_t *buffer, UInt_t num_words)
one F1TDC configuration and reference signal(s) holder
void SetSystemName(const TString name)
static const UInt_t kMaxNumberOfModulesPerROC
Int_t GetModuleIndex(size_t bank_index, size_t slot_num) const
static const Int_t kMaxNumberOfQwHitPlane
Double_t DoneF1TDCsConfiguration()
void SetF1BankIndex(const Int_t bank_index)
void SetF1SystemName(const TString name)
void SetPlane(const Int_t in)
void SetF1TDCIndex(const Int_t tdc_index)
QwF1TDContainer * fF1TDContainer
void Print(const Option_t *options=0) const
UInt_t fBankID[3]
F1TDCReferenceContainer * fF1RefContainer
TString GetSubsystemName() const
Definition: VQwSubsystem.h:93

+ Here is the call graph for this function:

Int_t QwMainDetector::ProcessEvBuffer ( const UInt_t  roc_id,
const UInt_t  bank_id,
UInt_t *  buffer,
UInt_t  num_words 
)
virtual

TODO: The non-event-type-aware ProcessEvBuffer routine should be replaced with the event-type-aware version.

Implements VQwSubsystem.

Definition at line 566 of file QwMainDetector.cc.

References QwF1TDContainer::CheckDataIntegrity(), MQwV775TDC::DecodeTDCWord(), MQwF1TDC::DecodeTDCWord(), Qw::e, fBankID, fDEBUG, fF1TDCDecoder, fF1TDContainer, FillRawTDCWord(), FillRawWord(), fModulePtrs, fQDCTDC, fRefTime, fRefTime_ChanNum, fRefTime_SlotNum, fSCAs, fSCAs_offset, GetModuleIndex(), VQwSubsystem::GetSubbankIndex(), VQwSubsystem::GetSubsystemName(), MQwV775TDC::GetTDCChannelNumber(), MQwF1TDC::GetTDCChannelNumber(), MQwV775TDC::GetTDCData(), MQwF1TDC::GetTDCData(), MQwV775TDC::GetTDCSlotNumber(), MQwF1TDC::GetTDCSlotNumber(), IsF1ReferenceChannel(), IsSlotRegistered(), MQwV775TDC::IsValidDataword(), MQwF1TDC::IsValidDataword(), and VQwSubsystem::SetDataLoaded().

567 {
568 
569  Int_t index = 0;
570 
571  index = GetSubbankIndex(roc_id,bank_id);
572 
573  //This is a QDC bank
574  if (bank_id == fBankID[0]) {
575  Bool_t fDEBUG = false;
576  if (fDEBUG)
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;
581 
582  if (index>=0 && num_words>0)
583  {
584  SetDataLoaded(kTRUE);
585  // We want to process this ROC. Begin looping through the data.
586  for (size_t i=0; i<num_words ; i++)
587  {
588  // Decode this word as a V775TDC word.
589  fQDCTDC.DecodeTDCWord(buffer[i]);
590 
591  if (! IsSlotRegistered(index, fQDCTDC.GetTDCSlotNumber())) continue;
592  // std::cout<<"Slot registered as "<<fQDCTDC.GetTDCSlotNumber()<<"\n";
593 
594  if (fQDCTDC.IsValidDataword()) {
595  // if (true)
596  // {
597  // This is a V775 TDC data
598  if (fDEBUG)
599  {
600  std::cout<<"This is a valid QDC/TDC data word. Index="<<index
601  <<" slot="<<fQDCTDC.GetTDCSlotNumber()<<" Ch="<<fQDCTDC.GetTDCChannelNumber()
602  <<" Data="<<fQDCTDC.GetTDCData()<<"\n";
603  }
604  try
605  {
607  fQDCTDC.GetTDCData());
608  }
609  catch (std::exception& e)
610  {
611  std::cerr << "Standard exception from QwMainDetector::FillRawTDCWord: "
612  << e.what() << std::endl;
613  Int_t chan = fQDCTDC.GetTDCChannelNumber();
614  std::cerr << " Parameters: index=="<<index
615  << "; GetV775SlotNumber()=="<<fQDCTDC.GetTDCSlotNumber()
616  << "; GetV775ChannelNumber()=="<<chan
617  << "; GetV775Data()=="<<fQDCTDC.GetTDCData()
618  << std::endl;
619  Int_t modindex = GetModuleIndex(index, fQDCTDC.GetTDCSlotNumber());
620  std::cerr << " GetModuleIndex()=="<<modindex
621  << "; fModulePtrs.at(modindex).size()=="
622  << fModulePtrs.at(modindex).size()
623  << "; fModulePtrs.at(modindex).at(chan).first {module type}=="
624  << fModulePtrs.at(modindex).at(chan).first
625  << "; fModulePtrs.at(modindex).at(chan).second {signal index}=="
626  << fModulePtrs.at(modindex).at(chan).second
627  << std::endl;
628  }
629  }
630  }
631  }
632  }
633  else if (bank_id==fBankID[1]) { // This is a SCA bank
634  // Check if scaler buffer contains more than one event
635  if (buffer[0]/32!=1) return 0;
636 
637  if (index>=0 && num_words>0) {
638  SetDataLoaded(kTRUE);
639  UInt_t words_read = 0;
640  for (size_t i=0; i<fSCAs.size(); i++) {
641  words_read += fSCAs.at(i).ProcessEvBuffer(&(buffer[fSCAs_offset.at(i)]),
642  num_words-fSCAs_offset.at(i));
643  }
644  }
645  }
646 
647  else if (bank_id==fBankID[2]) { // This is a F1TDC bank
648 
649  // reset the reference time
650  fRefTime = 0.0;
651 
652  Bool_t local_debug_f1 = false;
653 
654  Int_t bank_index = 0;
655  UInt_t tdc_data = 0;
656 
657 
658  Int_t dummy_slot_number = 0;
659  Int_t dummy_chan_number = 0;
660 
661  Bool_t data_integrity_flag = false;
662  Bool_t temp_print_flag = false;
663 
664  UInt_t hit_counter = 0;
665 
666  bank_index = GetSubbankIndex(roc_id, bank_id);
667 
668  if (bank_index>=0 && num_words>0) {
669  // We want to process this ROC. Begin looping through the data.
670  SetDataLoaded(kTRUE);
671 
672 
673  if (local_debug_f1 ) {
674  std::cout << "\nQwMainDetector::ProcessEvBuffer: "
675  << "Begin processing ROC"
676  << std::setw(2)
677  << roc_id
678  << " bank id "
679  << bank_id
680  << " Subbbank Index "
681  << bank_index
682  << " Region "
683  << GetSubsystemName()
684  << std::endl;
685  }
686 
687  //
688  // CheckDataIntegrity() do "counter" whatever errors in each F1TDC
689  // and check whether data is OK or not.
690 
691  data_integrity_flag = fF1TDContainer->CheckDataIntegrity(roc_id, buffer, num_words);
692  // if it is false (TFO, EMM, and SYN), the whole buffer is excluded for
693  // the further process, because of multiblock data transfer.
694 
695  if (data_integrity_flag) {
696 
697  dummy_slot_number = 0;
698  dummy_chan_number = 0;
699  hit_counter = 0;
700  for (UInt_t i=0; i<num_words ; i++) {
701 
702  // Decode this word as a F1TDC word.
703  fF1TDCDecoder.DecodeTDCWord(buffer[i], roc_id); // MQwF1TDC or MQwV775TDC
704 
705  // For MQwF1TDC, roc_id is needed to print out some warning messages.
706 
707  Int_t tdc_slot_number = fF1TDCDecoder.GetTDCSlotNumber();
708  Int_t tdc_chan_number = fF1TDCDecoder.GetTDCChannelNumber();
709  //Int_t tdcindex = GetModuleIndex(bank_index, tdc_slot_number);
710 
711  if ( tdc_slot_number == 31) {
712  // This is a custom word which is not defined in
713  // the F1TDC, so we can use it as a marker for
714  // other data; it may be useful for something.
715  }
716 
717  // Each subsystem has its own interesting slot(s), thus
718  // here, if this slot isn't in its slot(s) (subsystem map file)
719  // we skip this buffer to do the further process
720 
721  if (not IsSlotRegistered(bank_index, tdc_slot_number) ) continue;
722 
723  if(temp_print_flag) std::cout << fF1TDCDecoder << std::endl;
724 
725  if ( fF1TDCDecoder.IsValidDataword() ) {//;;
726  // if decoded F1TDC data has a valid slot, resolution locked, data word, no overflow (0xFFFF), and no fake data
727 
728  try {
729 
730  tdc_data = fF1TDCDecoder.GetTDCData();
731  if (dummy_slot_number == tdc_slot_number && dummy_chan_number == tdc_chan_number) {
732  hit_counter++;
733  }
734  else {
735  hit_counter = 0;
736  }
737 
738  if(local_debug_f1) {
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,
740  bank_index, tdc_slot_number, fRefTime_SlotNum, tdc_chan_number, fRefTime_ChanNum,tdc_data, fRefTime);
741  }
742 
743  if (hit_counter == 0) {
744  FillRawWord (bank_index, tdc_slot_number, tdc_chan_number, tdc_data);
745  if ( IsF1ReferenceChannel(tdc_slot_number,tdc_chan_number) ) {
746  fRefTime = (Double_t) tdc_data;
747  }
748  }
749 
750  FillRawTDCWord(bank_index, tdc_slot_number, tdc_chan_number, tdc_data);
751 
752  dummy_slot_number = tdc_slot_number;
753  dummy_chan_number = tdc_chan_number;
754 
755 
756  }
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
764  << std::endl;
765  }
766  }//;;
767  } // for (UInt_t i=0; i<num_words ; i++) {
768  }
769  }
770  }
771 
772  return 0;
773 }
Int_t GetSubbankIndex() const
Definition: VQwSubsystem.h:303
UInt_t GetTDCChannelNumber()
Definition: MQwV775TDC.h:43
void FillRawWord(Int_t bank_index, Int_t slot_num, Int_t chan, UInt_t data)
Bool_t IsSlotRegistered(Int_t bank_index, Int_t slot_num) const
UInt_t GetTDCData()
Definition: MQwV775TDC.h:44
std::vector< std::vector< std::pair< EQwModuleType, Int_t > > > fModulePtrs
const UInt_t & GetTDCData() const
Definition: MQwF1TDC.h:49
static const double e
Definition: QwUnits.h:91
Bool_t CheckDataIntegrity(const UInt_t roc_id, UInt_t *buffer, UInt_t num_words)
void FillRawTDCWord(Int_t bank_index, Int_t slot_num, Int_t chan, UInt_t data)
const UInt_t & GetTDCSlotNumber() const
Definition: MQwF1TDC.h:44
const UInt_t & GetTDCChannelNumber() const
Definition: MQwF1TDC.h:45
MQwV775TDC fQDCTDC
void DecodeTDCWord(UInt_t &word, const UInt_t roc_id=0)
Definition: MQwV775TDC.cc:53
Int_t GetModuleIndex(size_t bank_index, size_t slot_num) const
UInt_t GetTDCSlotNumber()
Definition: MQwV775TDC.h:42
Bool_t IsValidDataword() const
Definition: MQwF1TDC.cc:328
MQwF1TDC fF1TDCDecoder
std::vector< QwSIS3801D24_Channel > fSCAs
QwF1TDContainer * fF1TDContainer
std::vector< Int_t > fSCAs_offset
UInt_t fBankID[3]
void DecodeTDCWord(UInt_t &word, const UInt_t roc_id)
Definition: MQwF1TDC.cc:84
Bool_t IsValidDataword()
Definition: MQwV775TDC.h:39
TString GetSubsystemName() const
Definition: VQwSubsystem.h:93
Bool_t IsF1ReferenceChannel(Int_t slot, Int_t chan)
void SetDataLoaded(Bool_t flag)
Definition: VQwSubsystem.h:305

+ Here is the call graph for this function:

void QwMainDetector::ProcessEvent ( )
virtual

Implements VQwSubsystem.

Definition at line 776 of file QwMainDetector.cc.

References AddSoftwareMeantimeToHits(), fF1TDContainer, fPMTs, fRefTime, fSCAs, fSoftwareMeantimeOption, VQwSubsystem::HasDataLoaded(), QwF1TDContainer::ReferenceSignalCorrection(), QwF1TDContainer::ReturnTimeCalibration(), SubtractReferenceTimes(), and UpdateHits().

777 {
778  if (! HasDataLoaded()) return;
779 
780  TString elementname = "";
781 
782  Double_t rawtime_arb_unit = 0.0;
783  Double_t corrected_time_arb_unit = 0.0;
784  Double_t time_ns = 0.0;
785 
786 
787  Int_t bank_index = 0;
788  Int_t slot_num = 0;
789 
790  for (size_t i=0; i<fPMTs.size(); i++)
791  {
792  for (size_t j=0; j<fPMTs.at(i).size(); j++)
793  {
794  elementname = fPMTs.at(i).at(j).GetElementName();
795 
796 
797  if (elementname.EndsWith("f1") ) {
798  rawtime_arb_unit = fPMTs.at(i).at(j).GetValue(); // returns Double_t
799 
800  if ( rawtime_arb_unit not_eq 0.0) {
801 
802  if ( not elementname.Contains("reftime") ) {
803  bank_index = fPMTs.at(i).at(j).GetSubbankID();
804  slot_num = fPMTs.at(i).at(j).GetModule();
805  corrected_time_arb_unit = fF1TDContainer->ReferenceSignalCorrection(rawtime_arb_unit, fRefTime, bank_index, slot_num);
806  time_ns = fF1TDContainer->ReturnTimeCalibration(corrected_time_arb_unit);
807  fPMTs.at(i).at(j).SetValue(time_ns);
808  // printf("TS::ProcessBuffer: bank_index %2d slot_number [%2d,%2d] chan [%2d,%2d] data %10f %10.2f, %10.2f\n",
809  // bank_index, slot_num, fRefTime_SlotNum, tdc_chan_number, fRefTime_ChanNum, rawtime_arb_unit, fRefTime, corrected_time_arb_unit);
810  }
811  else {
812  // we save the referennce raw time
813  fPMTs.at(i).at(j).SetValue(rawtime_arb_unit);
814  }
815  }
816  else {
817  fPMTs.at(i).at(j).SetValue(rawtime_arb_unit); // zero
818  }
819 
820  }
821  else {
822  fPMTs.at(i).at(j).ProcessEvent();
823  }
824 
825  }//;;
826  }//;
827 
828  // F1TDCs of QwHit
830  UpdateHits();
832 
833  for (size_t i=0; i<fSCAs.size(); i++)
834  {
835  fSCAs.at(i).ProcessEvent();
836  }
837  return;
838 };
void SubtractReferenceTimes()
Bool_t HasDataLoaded() const
Definition: VQwSubsystem.h:94
void AddSoftwareMeantimeToHits(Bool_t option)
Bool_t fSoftwareMeantimeOption
Double_t ReferenceSignalCorrection(Double_t raw_time, Double_t ref_time, Int_t bank_index, Int_t slot)
std::vector< QwSIS3801D24_Channel > fSCAs
QwF1TDContainer * fF1TDContainer
Double_t ReturnTimeCalibration(Double_t time_arb_unit)
std::vector< std::vector< QwPMT_Channel > > fPMTs

+ Here is the call graph for this function:

void QwMainDetector::ProcessOptions ( QwOptions options)
virtual

Process the command line options.

Reimplemented from VQwSubsystem.

Definition at line 856 of file QwMainDetector.cc.

References fSoftwareMeantimeOption, fSoftwareMeantimeTimeWindowNs, and QwOptions::GetValue().

857 {
858  fSoftwareMeantimeOption = options.GetValue<Bool_t> ( "enable-md-software-meantime" );
859  fSoftwareMeantimeTimeWindowNs = options.GetValue<Double_t> ( "set-md-software-meantime-timewindow" );
860  return;
861 };
T GetValue(const std::string &key)
Get a templated value.
Definition: QwOptions.h:240
Bool_t fSoftwareMeantimeOption
Double_t fSoftwareMeantimeTimeWindowNs

+ Here is the call graph for this function:

EQwModuleType QwMainDetector::RegisterModuleType ( TString  moduletype)
protected

Definition at line 1077 of file QwMainDetector.cc.

References fCurrentModuleIndex, fCurrentType, fModuleTypes, fPMTs, kF1TDC, kSIS3801, kV775_TDC, and kV792_ADC.

Referenced by LoadChannelMap().

1078 {
1079  moduletype.ToUpper();
1080 
1081  // Check to see if we've already registered a type for the current slot,
1082  // if so, throw an error...
1083 
1084  if (moduletype=="V792") {
1086  }
1087  else if (moduletype=="V775") {
1089  }
1090  else if (moduletype=="F1TDC") {
1091  fCurrentType = kF1TDC;
1092  }
1093  else if (moduletype=="SIS3801") {
1095  }
1096 
1098 
1099  if ((Int_t) fPMTs.size()<=fCurrentType) {
1100  fPMTs.resize(fCurrentType+1);
1101  }
1102 
1103  return fCurrentType;
1104 }
std::vector< EQwModuleType > fModuleTypes
EQwModuleType fCurrentType
Int_t fCurrentModuleIndex
std::vector< std::vector< QwPMT_Channel > > fPMTs

+ Here is the caller graph for this function:

Int_t QwMainDetector::RegisterROCNumber ( const UInt_t  roc_id)
protected

Definition at line 1008 of file QwMainDetector.cc.

References fModuleIndex, kMaxNumberOfModulesPerROC, and VQwSubsystem::RegisterROCNumber().

Referenced by LoadChannelMap().

1009 {
1010  Int_t status = 0;
1011  status = VQwSubsystemTracking::RegisterROCNumber(roc_id, 0);
1012  std::vector<Int_t> tmpvec(kMaxNumberOfModulesPerROC,-1);
1013  fModuleIndex.push_back(tmpvec);
1014  return status;
1015 }
std::vector< std::vector< Int_t > > fModuleIndex
static const UInt_t kMaxNumberOfModulesPerROC
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.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Int_t QwMainDetector::RegisterSlotNumber ( const UInt_t  slot_id)
protected

Definition at line 1043 of file QwMainDetector.cc.

References fCurrentBankIndex, fCurrentModuleIndex, fCurrentSlot, fDetectorIDs, fModuleIndex, fModulePtrs, fModuleTypes, fNumberOfModules, kMaxNumberOfChannelsPerF1TDC, kMaxNumberOfModulesPerROC, and kUnknownModuleType.

Referenced by LoadChannelMap().

1044 {
1045  // printf("QwMainDetector::RegisterSlotNumber\n");
1046  std::pair<EQwModuleType, Int_t> tmppair;
1047  tmppair.first = kUnknownModuleType;
1048  tmppair.second = -1;
1049 
1050  if (slot_id<kMaxNumberOfModulesPerROC) {
1051 
1052  if ( fCurrentBankIndex <= (Int_t) fModuleIndex.size()) {
1053 
1054  fModuleTypes.resize(fNumberOfModules+1);
1055  fModulePtrs.resize(fNumberOfModules+1);
1057  tmppair);
1058  // fNumberOfModules = fModulePtrs.size();
1059 
1060  fDetectorIDs.resize(fNumberOfModules+1);
1062  // reassign kNumberOfModules after resize it
1063  fNumberOfModules = (Int_t) fDetectorIDs.size();
1065  fCurrentSlot = slot_id;
1067  }
1068  }
1069  else {
1070  std::cerr << "QwMainDetector::RegisterSlotNumber: Slot number "
1071  << slot_id << " is larger than the number of slots per ROC, "
1072  << kMaxNumberOfModulesPerROC << std::endl;
1073  }
1074  return fCurrentModuleIndex;
1075 }
std::vector< EQwModuleType > fModuleTypes
std::vector< std::vector< Int_t > > fModuleIndex
std::vector< std::vector< std::pair< EQwModuleType, Int_t > > > fModulePtrs
Int_t fCurrentBankIndex
Name of this subsystem (the region).
static const UInt_t kMaxNumberOfModulesPerROC
Int_t fCurrentModuleIndex
std::vector< std::vector< QwDetectorID > > fDetectorIDs
UInt_t kMaxNumberOfChannelsPerF1TDC

+ Here is the caller graph for this function:

Int_t QwMainDetector::RegisterSubbank ( const UInt_t  bank_id)
protected

Definition at line 1017 of file QwMainDetector.cc.

References fCurrentBankIndex, VQwSubsystem::fCurrentROC_ID, fModuleIndex, fReferenceChannels, fReferenceData, VQwSubsystem::GetSubbankIndex(), kMaxNumberOfModulesPerROC, and VQwSubsystem::RegisterSubbank().

Referenced by LoadChannelMap().

1018 {
1019  Int_t status = VQwSubsystem::RegisterSubbank(bank_id);
1020  Int_t current_roc_id = VQwSubsystem::fCurrentROC_ID;
1021 
1022  std::size_t reference_size = fReferenceChannels.size();
1023 
1024  fCurrentBankIndex = GetSubbankIndex(current_roc_id, bank_id);
1025 
1026  if ( (Int_t) reference_size <= fCurrentBankIndex) {
1029  }
1030 
1031  std::vector<Int_t> tmpvec(kMaxNumberOfModulesPerROC,-1);
1032  fModuleIndex.push_back(tmpvec);
1033 
1034  std::cout<< "QwMainDetector::RegisterSubbank()"
1035  <<" ROC " << current_roc_id
1036  <<" Subbank " << bank_id
1037  <<" with BankIndex " << fCurrentBankIndex
1038  << std::endl;
1039  return status;
1040 }
Int_t GetSubbankIndex() const
Definition: VQwSubsystem.h:303
std::vector< std::vector< Int_t > > fModuleIndex
std::vector< std::vector< Double_t > > fReferenceData
Int_t fCurrentBankIndex
Name of this subsystem (the region).
static const UInt_t kMaxNumberOfModulesPerROC
Int_t fCurrentROC_ID
ROC ID that is currently being processed.
Definition: VQwSubsystem.h:325
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< std::pair< Int_t, Int_t > > fReferenceChannels

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void QwMainDetector::ReportConfiguration ( Bool_t  verbose)

Definition at line 1554 of file QwMainDetector.cc.

References VQwSubsystem::fBank_IDs, fDetectorIDs, VQwSubsystem::fROC_IDs, GetModuleIndex(), VQwSubsystem::GetSubbankIndex(), VQwSubsystem::GetSubsystemName(), and kMaxNumberOfModulesPerROC.

Referenced by LoadChannelMap().

1555 {
1556 
1557  if(verbose) {
1558  std::size_t i = 0;
1559  std::size_t j = 0;
1560 
1561  Int_t roc_num = 0;
1562  Int_t bank_flag = 0;
1563  Int_t bank_index = 0;
1564  Int_t module_index = 0;
1565 
1566  UInt_t slot_id = 0;
1567  UInt_t vme_slot_num = 0;
1568 
1569  std::cout << " QwMainDetector : "
1570  << this->GetSubsystemName()
1571  << "::ReportConfiguration fDetectorIDs.size() "
1572  << fDetectorIDs.size() << std::endl;
1573 
1574 
1575  for ( i=0; i<fROC_IDs.size(); i++ )
1576  {
1577 
1578  roc_num = fROC_IDs.at(i);
1579 
1580  for ( j=0; j<fBank_IDs.at(i).size(); j++ )
1581  {
1582  bank_flag = fBank_IDs.at(i).at(j);
1583  if(bank_flag == 0) continue;
1584  // must be uncommented if one doesn't define "bank_flag" in a CRL file
1585  // but, now we use "bank_flag" in our crl files, thus skip to print
1586  // unnecessary things on a screen
1587  // Monday, August 30 14:45:34 EDT 2010, jhlee
1588 
1589  bank_index = GetSubbankIndex(roc_num, bank_flag);
1590 
1591  std::cout << "ROC [index, Num]["
1592  << i
1593  << ","
1594  << std::setw(2) << roc_num
1595  << "]"
1596  << " Bank [index,id]["
1597  << bank_index
1598  << ","
1599  << bank_flag
1600  << "]"
1601  << std::endl;
1602 
1603  for ( slot_id=2; slot_id<kMaxNumberOfModulesPerROC; slot_id++ )
1604  {
1605  // slot id starts from 2, because 0 and 1 are used for CPU and TI.
1606  // Tuesday, August 31 10:57:07 EDT 2010, jhlee
1607 
1608  module_index = GetModuleIndex(bank_index, slot_id);
1609 
1610  vme_slot_num = slot_id;
1611 
1612  std::cout << " "
1613  << "Slot [id, VME num] ["
1614  << std::setw(2) << slot_id
1615  << ","
1616  << std::setw(2) << vme_slot_num
1617  << "]";
1618  if ( module_index == -1 ) {
1619  std::cout << " "
1620  << "Unused in "
1621  << GetSubsystemName()
1622  << std::endl;
1623  }
1624  else {
1625  std::cout << " "
1626  << "Module index "
1627  << module_index << std::endl;
1628  }
1629  }
1630  }
1631  }
1632 
1633  for( size_t midx = 0; midx < fDetectorIDs.size(); midx++ )
1634  {
1635  for (size_t chan = 0 ; chan< fDetectorIDs.at(midx).size(); chan++)
1636  {
1637  std::cout << "[" << midx <<","<< chan << "] "
1638  << " detectorID " << fDetectorIDs.at(midx).at(chan)
1639  << std::endl;
1640  }
1641  }
1642  }
1643  return;
1644 }
Int_t GetSubbankIndex() const
Definition: VQwSubsystem.h:303
static const UInt_t kMaxNumberOfModulesPerROC
Int_t GetModuleIndex(size_t bank_index, size_t slot_num) const
std::vector< std::vector< UInt_t > > fBank_IDs
Vector of Bank IDs per ROC ID associated with this subsystem.
Definition: VQwSubsystem.h:331
std::vector< UInt_t > fROC_IDs
Vector of ROC IDs associated with this subsystem.
Definition: VQwSubsystem.h:329
std::vector< std::vector< QwDetectorID > > fDetectorIDs
TString GetSubsystemName() const
Definition: VQwSubsystem.h:93

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void QwMainDetector::SubtractReferenceTimes ( )
protected

Definition at line 1252 of file QwMainDetector.cc.

References fF1RefContainer, fF1TDContainer, fTDCHits, VQwSubsystem::GetSubsystemName(), QwMessage, and QwF1TDContainer::ReferenceSignalCorrection().

Referenced by ProcessEvent().

1253 {
1254 
1255 
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;
1260  // EQwDetectorPackage package = kPackageNull; // Region 1 has only Package 2, so kPackageDown
1261 
1262  Bool_t local_debug = false;
1263  Int_t slot_num = 0;
1264 
1265  TString reference_name1 = "MasterTrigger";
1266  // TString reference_name2 = "CopyMasterTrigger";
1267 
1268 
1269  for ( std::vector<QwHit>::iterator hit=fTDCHits.begin(); hit!=fTDCHits.end(); hit++ )
1270  {
1271 
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);
1276  //
1277  // if there is no reference time due to a channel error, try to use a copy of mater trigger
1278  //
1279  // if(ref_time_arb_unit==0.0) {
1280  // ref_time_arb_unit = fF1RefContainer->GetReferenceTimeAU(bank_index, reference_name2);
1281  // }
1282  // second time, it returns 0.0, we simply ignore this event ....
1283  // set time zero. ReferenceSignalCorrection() will return zero, and increase RFM counter...
1284  //
1285  time_arb_unit = fF1TDContainer->ReferenceSignalCorrection(raw_time_arb_unit, ref_time_arb_unit, bank_index, slot_num);
1286 
1287  hit -> SetTime(time_arb_unit);
1288  hit -> SetRawRefTime((UInt_t) ref_time_arb_unit);
1289 
1290  if(local_debug) {
1291  QwMessage << this->GetSubsystemName()
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
1297  << std::endl;
1298 
1299  }
1300  }
1301 
1302  return;
1303 }
#define QwMessage
Predefined log drain for regular messages.
Definition: QwLog.h:50
std::vector< QwHit > fTDCHits
Double_t ReferenceSignalCorrection(Double_t raw_time, Double_t ref_time, Int_t bank_index, Int_t slot)
QwF1TDContainer * fF1TDContainer
F1TDCReferenceContainer * fF1RefContainer
TString GetSubsystemName() const
Definition: VQwSubsystem.h:93

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void QwMainDetector::UpdateHits ( )
protected

Definition at line 1308 of file QwMainDetector.cc.

References VQwSubsystemTracking::fF1TDCResolutionNS, and fTDCHits.

Referenced by ProcessEvent().

1309 {
1310 
1311  // std::vector... is weird
1312  // I use a plane number to assign a f1tdc channel. Channel 99 is the F1TDC reference channel
1313  // , becaue I see plan is 0 in qweak_new.geo file and I think, nowhere plane is used in analyzer
1314  // But, I am wrong. This double std::vector fDetectorInfo uses plane number as second index,
1315  // So I had the notorious following error
1316  // Terminate called after throwing an instance of 'std::out_of_range'
1317  // what(): vector::_M_range_check
1318  // Abort
1319  //
1320  //
1321  // I don't care about QwDetectorInfo for other tracking subsystems except VDC/HDC,
1322  // I disable to fill QwDetectorInfo into QwHit
1323 
1324  // Thursday, January 26 10:30:09 EST 2012, jhlee
1325 
1326 
1327  // EQwDetectorPackage package = kPackageNull;
1328  // // Int_t plane = 0;
1329 
1330  // QwDetectorID local_id;
1331  // QwDetectorInfo *local_info;
1332 
1333 
1334  // Int_t plane = 0;
1335  // Int_t element = 0;
1336  // Int_t hitnumber = 0;
1337  // Double_t timens = 0.0;
1338  // TString output = "";
1339 
1340 
1341  for(std::vector<QwHit>::iterator iter=fTDCHits.begin(); iter!=fTDCHits.end(); ++iter)
1342  {
1343  // local_id = iter->GetDetectorID();
1344  // package = local_id.fPackage;
1345  // // plane = local_id.fPlane;
1346 
1347 
1348  // local_info = fDetectorInfo.in(package).at(0);
1349  // // local_info = fDetectorInfo.in(package).at(plane);
1350 
1351  // iter->SetDetectorInfo(local_info);
1352  iter->ApplyTimeCalibration(fF1TDCResolutionNS); // Fill fTimeRes and fTimeNs in QwHit
1353 
1354 
1355  }
1356 
1357 
1358  return;
1359 }
std::vector< QwHit > fTDCHits

+ Here is the caller graph for this function:

Field Documentation

UInt_t QwMainDetector::fBankID[3]
protected
Int_t QwMainDetector::fCurrentBankIndex
protected

Name of this subsystem (the region).

Definition at line 96 of file QwMainDetector.h.

Referenced by LoadChannelMap(), QwMainDetector(), RegisterSlotNumber(), and RegisterSubbank().

Int_t QwMainDetector::fCurrentModuleIndex
protected
Int_t QwMainDetector::fCurrentSlot
protected

Definition at line 97 of file QwMainDetector.h.

Referenced by QwMainDetector(), and RegisterSlotNumber().

EQwModuleType QwMainDetector::fCurrentType
protected

Definition at line 89 of file QwMainDetector.h.

Referenced by LinkChannelToSignal(), LoadChannelMap(), and RegisterModuleType().

Bool_t QwMainDetector::fDEBUG
protected

Definition at line 91 of file QwMainDetector.h.

Referenced by ProcessEvBuffer(), and QwMainDetector().

std::vector< std::vector< QwDetectorID > > QwMainDetector::fDetectorIDs
protected
MQwF1TDC QwMainDetector::fF1TDCDecoder
protected

Definition at line 117 of file QwMainDetector.h.

Referenced by ProcessEvBuffer(), and QwMainDetector().

std::vector< std::vector<Int_t> > QwMainDetector::fModuleIndex
protected
std::vector< std::vector< std::pair< EQwModuleType, Int_t> > > QwMainDetector::fModulePtrs
protected
std::vector< EQwModuleType > QwMainDetector::fModuleTypes
protected
Int_t QwMainDetector::fNumberOfModules
protected

Definition at line 111 of file QwMainDetector.h.

Referenced by ClearAllBankRegistrations(), QwMainDetector(), and RegisterSlotNumber().

MQwV775TDC QwMainDetector::fQDCTDC
protected

Definition at line 116 of file QwMainDetector.h.

Referenced by ProcessEvBuffer().

std::vector< std::pair<Int_t, Int_t> > QwMainDetector::fReferenceChannels
protected

Definition at line 149 of file QwMainDetector.h.

Referenced by LoadChannelMap(), and RegisterSubbank().

std::vector< std::vector<Double_t> > QwMainDetector::fReferenceData
protected

Definition at line 152 of file QwMainDetector.h.

Referenced by ClearEventData(), FillRawTDCWord(), and RegisterSubbank().

Double_t QwMainDetector::fRefTime
protected

Definition at line 170 of file QwMainDetector.h.

Referenced by ProcessEvBuffer(), and ProcessEvent().

Int_t QwMainDetector::fRefTime_ChanNum
protected

Definition at line 169 of file QwMainDetector.h.

Referenced by IsF1ReferenceChannel(), LoadChannelMap(), and ProcessEvBuffer().

Int_t QwMainDetector::fRefTime_SlotNum
protected

Definition at line 168 of file QwMainDetector.h.

Referenced by IsF1ReferenceChannel(), LoadChannelMap(), and ProcessEvBuffer().

TString QwMainDetector::fRegion
protected

Definition at line 95 of file QwMainDetector.h.

Referenced by QwMainDetector().

std::map<TString,size_t> QwMainDetector::fSCAs_map
protected

Definition at line 164 of file QwMainDetector.h.

Referenced by LoadChannelMap().

std::vector<Int_t> QwMainDetector::fSCAs_offset
protected

Definition at line 165 of file QwMainDetector.h.

Referenced by LoadChannelMap(), and ProcessEvBuffer().

MeanTimeContainer* QwMainDetector::fSoftwareMeantimeContainer[8]
protected
Bool_t QwMainDetector::fSoftwareMeantimeOption
protected

Definition at line 92 of file QwMainDetector.h.

Referenced by ProcessEvent(), ProcessOptions(), and QwMainDetector().

Double_t QwMainDetector::fSoftwareMeantimeTimeWindowNs
protected

Definition at line 93 of file QwMainDetector.h.

Referenced by AddSoftwareMeantimeToHits(), ProcessOptions(), and QwMainDetector().

std::vector< QwHit > QwMainDetector::fTDCHits
protected
const Int_t QwMainDetector::kF1ReferenceChannelNumber = 99
staticprotected

Definition at line 108 of file QwMainDetector.h.

Referenced by FillRawTDCWord(), and LoadChannelMap().

UInt_t QwMainDetector::kMaxNumberOfChannelsPerF1TDC
protected

Definition at line 110 of file QwMainDetector.h.

Referenced by QwMainDetector(), and RegisterSlotNumber().

const UInt_t QwMainDetector::kMaxNumberOfModulesPerROC = 21
staticprotected
const Int_t QwMainDetector::kMaxNumberOfQwHitPlane = 8
staticprotected

The documentation for this class was generated from the following files: