From 17993bc512dffa393d79f23a183c47a5ecdfe689 Mon Sep 17 00:00:00 2001 From: deserevi <deserevi@nptool> Date: Tue, 8 Mar 2011 15:05:06 +0000 Subject: [PATCH] * Add support for online analysis + Add new method SetRawDataPointer(TxxxData*) which gives by hand the TxxxData object to the corresponding TxxxPhysics object --- NPLib/CATS/TCATSPhysics.h | 7 +++++-- NPLib/MUST2/TMust2Physics.h | 6 ++++++ NPLib/SSSD/TSSSDPhysics.h | 8 +++++++- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/NPLib/CATS/TCATSPhysics.h b/NPLib/CATS/TCATSPhysics.h index 8d8457dc0..05b64203f 100644 --- a/NPLib/CATS/TCATSPhysics.h +++ b/NPLib/CATS/TCATSPhysics.h @@ -147,8 +147,11 @@ class TCATSPhysics : public TObject, public NPA::VDetector // Those two method all to clear the Event Physics or Data void ClearEventPhysics() {Clear();} void ClearEventData() {EventData->Clear();} - - + + // Give and external TMustData object to TMust2Physics. Needed for online analysis for example. + void SetRawDataPointer(TCATSData* rawDataPointer) {EventData = rawDataPointer;} + + private : // redundant information : could be optimized in the future diff --git a/NPLib/MUST2/TMust2Physics.h b/NPLib/MUST2/TMust2Physics.h index 717d00cb5..2cc6e0fa2 100644 --- a/NPLib/MUST2/TMust2Physics.h +++ b/NPLib/MUST2/TMust2Physics.h @@ -159,6 +159,12 @@ class TMust2Physics : public TObject, public NPA::VDetector // Use for reading Calibration Run, very simple methods; only apply calibration, no condition void ReadCalibrationRun(); + // Give and external TMustData object to TMust2Physics. Needed for online analysis for example. + void SetRawDataPointer(TMust2Data* rawDataPointer) {m_EventData = rawDataPointer;} + // Retrieve raw and pre-treated data + TMust2Data* GetRawData() const {return m_EventData;} + TMust2Data* GetPreTreatedData() const {return m_PreTreatedData;} + // Use to access the strip position double GetStripPositionX( const int N , const int X , const int Y ) const{ return m_StripPositionX[N-1][X-1][Y-1] ; } ; double GetStripPositionY( const int N , const int X , const int Y ) const{ return m_StripPositionY[N-1][X-1][Y-1] ; } ; diff --git a/NPLib/SSSD/TSSSDPhysics.h b/NPLib/SSSD/TSSSDPhysics.h index 4617901d5..e30982b2d 100644 --- a/NPLib/SSSD/TSSSDPhysics.h +++ b/NPLib/SSSD/TSSSDPhysics.h @@ -90,7 +90,13 @@ class TSSSDPhysics : public TObject, public NPA::VDetector void InitializeStandardParameter(); // Read the user configuration file; if no file found, load standard one - void ReadAnalysisConfig(); + void ReadAnalysisConfig(); + + // Give and external TMustData object to TMust2Physics. Needed for online analysis for example. + void SetRawDataPointer(TSSSDData* rawDataPointer) {EventData = rawDataPointer;} + // Retrieve raw and pre-treated data + TSSSDData* GetRawData() const {return EventData;} + TSSSDData* GetPreTreatedData() const {return PreTreatedData;} private: // Data not written in the tree -- GitLab