19 #include "MockDataDAQ/Configuration.h" 20 #include "MockDataDAQ/DAQSimulator.h" 21 #include "MockDataDAQ/GlobalEventTime.h" 25 #include "NovaDAQConventions/DAQConventions.h" 91 assert((
stat(
fOutputDir.c_str(), &sb) == 0 && S_ISDIR(sb.st_mode)) &&
"Output directory doesn't exist or we don't have permissions to it, fail.");
137 + addition_to_file_name
139 return full_file_name;
146 std::cout<<
"MockDataDAQ Configuration: ";
168 if(!file)
return true;
170 const size_t size_of_data_in_words = daq_data.
sizeofdata();
172 if(size_of_data_in_words == 0)
return true;
174 fwrite (daq_data.
getBuffer(), 4, size_of_data_in_words,
file);
181 return fopen (file_name.c_str(),
"wb");
191 fwrite (&daq_sim_version, 4 , 1, file);
static std::string GetName(int id)
bool print() const
Print Configuration.
bool isProducingJustMicroSlices() const
Do we produce just microslices?
uint32_t fNumberOfMicroslicesInMilliSlice
!< ipnd, near, far
static const uint32_t DEFAULT_NUMBER_MICROSLICES_IN_MILLISLICE
uint32_t getNumberOfBufferNodes() const
Number of buffer nodes.
Configuration()
default constructor
static const uint32_t DEFAULT_DCM_MICROSLICE_DT
bool fIsProducingJustMicroSlices
static bool setInstance(fhicl::ParameterSet const &pset)
Method to set the class instance with parameters from fhicl.
daqdataformats::version_t fNanoSliceVersion
!< Are me going to produce MilliSlices?
std::string fOutputDir
Directory for the output files.
static Configuration * finstanceID
FILE * openFile(const std::string file_name) const
Open file for binary write access.
uint32_t fNumberOfBufferNodes
Number of buffer nodes.
std::string getOutputDir() const
GetOutput Directory.
bool fIsProducingMilliSlices
!< Are we producing Run Object?
std::string fFileName
Output file names.
static Configuration * getInstance()
Method to obtain the class instance.
bool fIsProducingRunObject
!< Are we producing just microslices?
uint32_t getEventTimeDifference() const
Event time difference in NOvA clock ticks (15.626 ns)
static const uint32_t DEFAULT_NUMBER_OF_BUFFERNODES
Something conflicts with RandomNumberGenerator. Keep DAQSimulator.h include below Art Framework inclu...
daqdataformats::version_t fMicroBlockVersion
uint32_t getDAQSimulatorVersion() const
Get Global DAQSimulator version.
int getDetector() const
Get Detector ID.
novadaq::cnv::DetId DetId() const
Prefer ds::DetectorService::DetId() instead.
uint32_t fMicrosliceDT
MicroSlice length in NOvA clock ticks (15.626 ns)
bool isDetectorUnknown() const
Check Detector if it's unknown ID.
bool writeToFile(FILE *, const daqdataformats::RawDAQData &) const
Utility method of writing DAQ data into a file.
static const uint32_t DEFAULT_TIME_DIFF
bool isProducingRunObject() const
Do we produce Run object?
daqdataformats::version_t getNanoSliceVersion() const
Get NanoSlice version.
std::string getFullFileName(const std::string addition_to_file_name) const
std::string getFileName() const
Get File name.
bool init()
initialize detector
static const uint32_t DAQSIMULATION_VERSION
Version of the DAQ simulation.
int fDetector
!< Instance pointer for singleton class
bool writeDAQSimulatorVersionIntoFile(FILE *) const
Write Global DAQSimulator version into the input file.
uint32_t fEventTimeDifference
Event time difference in NOvA clock ticks (15.626 ns)
assert(nhit_max >=nhit_nbins)
uint32_t getMicrosliceDT() const
MicroSlice DT.
daqdataformats::version_t getMicroBlockVersion() const
Get MicroBlock version.
Encapsulate the geometry of one entire detector (near, far, ndos)
static const daqdataformats::version_t DEFAULT_NANOSLICE_VERSION