Berkeley Nuclear Data Software
Public Member Functions | List of all members
CompactCoinPostProc Class Reference

#include <CompactCoinPostProc.h>

Inheritance diagram for CompactCoinPostProc:
Inheritance graph
[legend]
Collaboration diagram for CompactCoinPostProc:
Collaboration graph
[legend]

Public Member Functions

 CompactCoinPostProc ()
 
 CompactCoinPostProc (std::string a_config)
 
void generateClovCalibratedHists (std::string a_config, double a_cutTime=std::numeric_limits< double >::infinity())
 
void generatePhysEvents (std::string a_outFile)
 this functon generates a TTree in the specified outfile. More...
 
void generatePhysEventsCyclical (std::string a_outFile, std::string a_externalJSONTimestampFile="NONE")
 
int readConfig (std::string a_config)
 
void generateClovCalibrationHists (std::string a_outFileName)
 
void generateTriggerList (std::string a_outFile)
 
std::ostream & printConfig (std::ostream &a_stream=std::cout)
 prints the config file More...
 
vector< TH2F * > plotBeamTimeCh (std::string a_scintTreeFile)
 
- Public Member Functions inherited from MesyDAQPostProcessing
 MesyDAQPostProcessing ()
 defualt constructor puts class into a working state More...
 
void setOptVerbose (int a_verbosity)
 sets how much information to print while parsing More...
 
void setWriteZeros (bool a_state)
 
void setEnforceBoardCount (bool a_state)
 
int addFile (std::string a_fileName)
 this function adds a file to the list of files to be processed More...
 
int addRootFile (std::string a_filename)
 
int runIntegrityChecks ()
 
int testCorrelations ()
 
void buildCoinHists ()
 
void buildDeltaTTestHist (int a_modID1, int a_modID2, int a_ch1, int a_ch2)
 
int accumulateBasicQuantities ()
 build a series of histograms for More...
 
int fileNotLoaded ()
 tests if a file is loaded and prinst a message if not More...
 
TH1 * buildCoincidenceTimeHistogram (int a_moduleNumber, int a_channel1, int a_channel2, double a_res)
 
void writeBasicHists (std::string a_filename)
 clears the map More...
 
void writeAmplitudeHistsToAscii ()
 
vector< TH1 * > buildSingleBoardCalibrationHistograms (std::vector< int > a_chList={})
 
int ProcessEventToMesyDAQEv (MesyDAQEvent *a_daqEv, uint32_t *buffer, size_t a_size, int a_fileVersion)
 
int ProcessEventToMDPP16Events (std::vector< MDPP16Event > *a_evVector, uint32_t *a_buffer, size_t a_size, int a_fileVersion, std::ostream &a_stream=std::cout)
 
int loadNextEvent ()
 this function adds a file to the list of files to be processed More...
 
int readMDPPEvents (long int a_num, bool a_resEvVec=true)
 reads a series of sections into memory for processing More...
 
int loadNextSectionToMDPP16Ev ()
 
int processZipToMesyDAQEv (std::string a_fileName, std::string a_outFileName)
 
int processZipToMDPPEvent (std::string a_fileName, std::string a_outFileName)
 
void generateCloverCalibrationHists (std::vector< CloverInfo > a_config)
 
std::vector< TH1 * > getCloverCalibrationHists (const CloverInfo &a_config)
 
void generateWallTimeVAmpTree (ExperimentConfig a_configFile, std::vector< DetType > a_typeList, std::string a_outFileName, double a_downSampleScaler=-1)
 
void generateGlobalTimeVAmpTree (ExperimentConfig a_configFile, std::vector< DetType > a_typeList, std::string a_outFileName, double a_downSampleScaler=-1)
 
void generateOrganicScintillatorHists (std::string a_fileName)
 
void findCoincidences (std::vector< MDPP16Event > *a_evVec, std::vector< int > &a_singlesList, std::vector< std::vector< int >> &a_coinList, double a_coinWinNs, std::map< uint32_t, std::vector< uint16_t >> &a_RFTimes, bool a_accumulateRFs=true, bool a_includeSingleBoard=true)
 
void createTriggerVsWallTimeHist (std::string a_outFile, int a_moduleID=17, int a_threshold=10)
 
void investigateSections (std::vector< int > a_anticipatedBoards, std::vector< int > a_trigArray)
 
void retrieveBeamOnTimes (std::string a_inputFilename, std::string a_outputFilename)
 
void generateWallTimeTrigInterEventTime (std::string a_outputFileName, int a_numSections=100000)
 
void testCleanTrigArray (std::string a_outputFileName, int a_numSections, uint16_t a_boardID, uint16_t a_trigID, uint16_t a_desiredPeriod, uint16_t a_obsTrigPeriod, uint16_t a_jitterThreshold=2)
 
std::ostream & printFileStartTime (std::ostream &a_stream=std::cout)
 
std::ostream & printLoadedEvents (std::ostream &a_stream=std::cout)
 this functions prints the events from the m_evVec vector More...
 
std::ostream & printLoadedSection (std::ostream &a_stream=std::cout)
 
std::ostream & printBadEvent (std::ostream &a_stream=std::cout)
 this function print bad event info More...
 
std::ostream & printLastSection (std::ostream &a_stream=std::cout)
 

Additional Inherited Members

- Static Public Member Functions inherited from MesyDAQPostProcessing
static void developCleanTrigArray (std::vector< uint16_t > &a_obsTrigs, std::vector< uint16_t > &a_resultArray, uint16_t a_desiredPeriod, uint16_t a_obsTrigPeriod, uint16_t a_jitterThreshold=2)
 
- Protected Member Functions inherited from MesyDAQPostProcessing
void createBoardHists (int a_boardNumber)
 creates basic histograms for a board More...
 
vector< TH1 * > & getBoardHistVector (int a_boardNumber)
 
TH1 * createSCPAmpHist (std::string a_name)
 
TH1 * createDeltaTDCHist (std::string a_name)
 
int openFile (std::string a_fileName)
 
void getRunStartTime (std::string a_fileName)
 
void getRunStopTime (std::string a_fileName)
 
- Protected Attributes inherited from MesyDAQPostProcessing
TChain * m_trees
 for associating the trees from files More...
 
MesyDAQEventm_currentEvent
 for storing the current event More...
 
std::vector< MDPP16Event > * m_evVec
 used for storing a series of MDPP16 events; More...
 
std::vector< std::string > m_loadedFiles
 for storing a list of loaded files More...
 
map< int, vector< TH1 * > > m_basicHists
 
bool m_hasFile
 flag for wheter a file has been loaded More...
 
std::vector< std::string > m_files
 used for storing list of files to be processed More...
 
int m_fileIndex
 used to reference which of the current files in the list is open More...
 
int m_fileVersion
 
int m_optVerbose
 
bool m_writeZeros
 
bool m_enforceBoardCount
 
std::tm m_lastFileTime
 
std::tm m_lastFileStopTime
 
std::map< FailMode, int > m_badEvCounter
 
std::map< int, int > m_sectionTypeCounter
 
long int m_sectionsRead
 
DataBuffer * m_dataBuffer
 from MVME More...
 
int m_bufferSize
 
DataBuffer * m_lastDataBuffer
 
int m_lastBufferSize
 
ListFile m_listFileUtil
 From mesytec for storing the current opened file. More...
 
bool m_fileOpen
 used to ensure file is open More...
 
bool m_sectionRead
 
std::default_random_engine m_generator
 

Constructor & Destructor Documentation

◆ CompactCoinPostProc() [1/2]

CompactCoinPostProc::CompactCoinPostProc ( )

default constructor puts the class in a working but boring state as most of the functions won't respond without having added a file and read a config

◆ CompactCoinPostProc() [2/2]

CompactCoinPostProc::CompactCoinPostProc ( std::string  a_config)

This constructor reads a config file and puts the class in a mostly working state. A file for processing still needs to be added

Member Function Documentation

◆ generateClovCalibratedHists()

void CompactCoinPostProc::generateClovCalibratedHists ( std::string  a_config,
double  a_cutTime = std::numeric_limits<double>::infinity() 
)

This functon requires that the loaded config file has gain calibrations It produces histograms for the individual leafs of the clovers in the config in the energy space implied by the config

Here is the call graph for this function:
Here is the caller graph for this function:

◆ generateClovCalibrationHists()

void CompactCoinPostProc::generateClovCalibrationHists ( std::string  a_outFileName)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ generatePhysEvents()

void CompactCoinPostProc::generatePhysEvents ( std::string  a_outFile)

this functon generates a TTree in the specified outfile.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ generatePhysEventsCyclical()

void CompactCoinPostProc::generatePhysEventsCyclical ( std::string  a_outFile,
std::string  a_externalJSONTimestampFile = "NONE" 
)

given a beam on/off json file, fills root trees with quantities of interest in a similar mannar as above

Here is the call graph for this function:

◆ generateTriggerList()

void CompactCoinPostProc::generateTriggerList ( std::string  a_outFile)
Here is the call graph for this function:

◆ plotBeamTimeCh()

vector< TH2F * > CompactCoinPostProc::plotBeamTimeCh ( std::string  a_scintTreeFile)
Here is the call graph for this function:

◆ printConfig()

std::ostream & CompactCoinPostProc::printConfig ( std::ostream &  a_stream = std::cout)

prints the config file

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readConfig()

int CompactCoinPostProc::readConfig ( std::string  a_config)

reads a config file and associates it with the internal class member

Here is the call graph for this function:
Here is the caller graph for this function:

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