File NPVDetector.h
File List > core > NPVDetector.h
Go to the documentation of this file
#ifndef NPVDetector_h
#define NPVDetector_h
#include "NPInputParser.h"
#include "NPVDataInput.h"
#include "NPVDataOutput.h"
#include "NPVPlugin.h"
namespace nptool {
class VDetector : public VPlugin {
public:
VDetector(){};
~VDetector(){};
// Read stream at ConfigFile to pick-up parameters of detector (Position,...) using Token
virtual void ReadConfiguration(nptool::InputParser){};
// Add Parameter to the CalibrationManger
virtual void AddParameterToCalibrationManager(){};
// Use to link a detector to a DAQ data stream
virtual void InitializeDataInputConversion(std::shared_ptr<nptool::VDataInput>){};
// Activated associated Branches and link it to the private member DetectorRaw address
// In this method mother Branches (Detector) AND daughter leaf (parameter) have to be activated
virtual void InitializeDataInputRaw(std::shared_ptr<nptool::VDataInput>){};
// Activated associated Branches and link it to the private member DetectorPhysics address
// In this method mother Branches (Detector) AND daughter leaf (parameter) have to be activated
virtual void InitializeDataInputPhysics(std::shared_ptr<nptool::VDataInput>){};
// Create associated branches and associated private member DetectorPhysics address
virtual void InitializeDataOutputRaw(std::shared_ptr<nptool::VDataOutput>){};
// Create associated branches and associated private member DetectorPhysics address
virtual void InitializeDataOutputPhysics(std::shared_ptr<nptool::VDataOutput>){};
// This method is called at each event read from the Input Tree. Aim is to build treated raw data in order to
// extract physical parameter.
virtual void BuildPhysicalEvent(){};
// This method is called at each event of a conversion to fill in the data class
virtual void BuildRawEvent(const std::string& daq_name, const std::string& label, void* ptr_to_data){};
// Clear respective Physics and Data class
virtual void ClearEventPhysics(){};
virtual void ClearEventData(){};
// Method related to the TSpectra classes, aimed at providing a framework for online applications
// Instantiate the Spectra class and the histogramm throught it
virtual void InitSpectra(){};
// Fill the spectra hold by the spectra class
virtual void FillSpectra(){};
// Write the spectra to a file
virtual void WriteSpectra(){};
// Used for Online mainly, perform check on the histo and for example change their color if issues are found
virtual void CheckSpectra(){};
// Used for Online only, clear all the spectra hold by the Spectra class
virtual void ClearSpectra(){};
// Used for interoperability with other framework
virtual void SetRawDataPointer(void*){};
// Simulation
virtual void InitSimulation(std::string simtype){};
virtual void ConstructGeometry(){};
virtual void InitializeScorers(){};
virtual void ReadSensitive(){};
// special
void ClearAndBuild() {
ClearEventPhysics();
BuildPhysicalEvent();
}
public:
bool IsService() { return false; };
bool IsDetector() { return true; };
};
} // namespace nptool
#endif