-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
more processes and metadata #1
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
set(LibraryVersion "1.0") | ||
add_definitions(-DLIBRARY_VERSION="${LibraryVersion}") | ||
|
||
COMPILELIB("") | ||
set(deps detector) | ||
|
||
COMPILELIB(deps) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#ifndef RestCore_TRestDriftVolume | ||
#define RestCore_TRestDriftVolume | ||
|
||
#include "TRestDetectorDriftVolume.h" | ||
|
||
typedef TRestDetectorDriftVolume TRestDriftVolume; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This class has been renamed? Not quite understand this class |
||
|
||
#endif |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#ifndef RestCore_TRestGainMap | ||
#define RestCore_TRestGainMap | ||
|
||
|
||
#include "TRestDetectorGainMap.h" | ||
|
||
typedef TRestDetectorGainMap TRestGainMap; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here? The |
||
|
||
#endif |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#ifndef RestCore_TRestGas | ||
#define RestCore_TRestGas | ||
|
||
#include "TRestDetectorGas.h" | ||
|
||
typedef TRestDetectorGas TRestGas; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same |
||
|
||
#endif |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
|
||
#ifndef TRestSoft_TRestHitsEvent | ||
#define TRestSoft_TRestHitsEvent | ||
|
||
#include <TGraph.h> | ||
|
||
#include <iostream> | ||
|
||
#include "TArrayI.h" | ||
#include "TAxis.h" | ||
#include "TGraph2D.h" | ||
#include "TH2F.h" | ||
#include "TMath.h" | ||
#include "TObject.h" | ||
#include "TRestEvent.h" | ||
#include "TRestHits.h" | ||
#include "TVector3.h" | ||
|
||
//! An event data type that register a vector of TRestHits, | ||
//! allowing us to save a 3-coordinate position and energy. | ||
class TRestHitsEvent : public TRestEvent { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think that |
||
private: | ||
/// An auxiliar TRestHits structure to register hits on XZ projection | ||
TRestHits* fXZHits; //! | ||
/// An auxiliar TRestHits structure to register hits on YZ projection | ||
TRestHits* fYZHits; //! | ||
|
||
/// An auxiliar TRestHits structure to register hits on XYZ projection | ||
TRestHits* fXYZHits; //! | ||
|
||
/// Stores the minimum x-position value. It is initialized by SetBoundaries. | ||
Double_t fMinX; //! | ||
/// Stores the maximum x-position value. It is initialized by SetBoundaries. | ||
Double_t fMaxX; //! | ||
|
||
/// Stores the minimum y-position value. It is initialized by SetBoundaries. | ||
Double_t fMinY; //! | ||
/// Stores the maximum y-position value. It is initialized by SetBoundaries. | ||
Double_t fMaxY; //! | ||
|
||
/// Stores the minimum z-position value. It is initialized by SetBoundaries. | ||
Double_t fMinZ; //! | ||
/// Stores the maximum z-position value. It is initialized by SetBoundaries. | ||
Double_t fMaxZ; //! | ||
|
||
protected: | ||
// TODO These graphs should be placed in TRestHits? | ||
// (following similar GetGraph implementation in TRestSignal) | ||
|
||
/// An auxiliar TGraph pointer to visualize hits on XY-projection. | ||
TGraph* fXYHitGraph; //! | ||
/// An auxiliar TGraph pointer to visualize hits on XZ-projection. | ||
TGraph* fXZHitGraph; //! | ||
/// An auxiliar TGraph pointer to visualize hits on YZ-projection. | ||
TGraph* fYZHitGraph; //! | ||
|
||
/// An auxiliar TH2F histogram to visualize hits on XY-projection. | ||
TH2F* fXYHisto; //! | ||
/// An auxiliar TH2F histogram to visualize hits on YZ-projection. | ||
TH2F* fYZHisto; //! | ||
/// An auxiliar TH2F histogram to visualize hits on XZ-projection. | ||
TH2F* fXZHisto; //! | ||
|
||
TGraph2D* gxz = NULL; //! | ||
TGraph2D* gyz = NULL; //! | ||
|
||
/// An auxiliar TH1F histogram to visualize hits on X-projection. | ||
TH1F* fXHisto; //! | ||
/// An auxiliar TH1F histogram to visualize hits on Y-projection. | ||
TH1F* fYHisto; //! | ||
/// An auxiliar TH1F histogram to visualize hits on Z-projection. | ||
TH1F* fZHisto; //! | ||
|
||
/// The hits structure that is is saved to disk. | ||
TRestHits fHits; // | ||
|
||
public: | ||
void Initialize() { | ||
TRestEvent::Initialize(); | ||
fHits.RemoveHits(); | ||
} | ||
|
||
// Construtor | ||
TRestHitsEvent() {} | ||
// Destructor | ||
~TRestHitsEvent() {} | ||
|
||
ClassDef(TRestHitsEvent, 2); | ||
}; | ||
#endif |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,4 +52,23 @@ class TRestLegacyProcess : public TRestEventProcess { | |
|
||
ClassDefOverride(TRestLegacyProcess, 0); | ||
}; | ||
|
||
#define LegacyProcessDef(thisname, newname, n) \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am not fan of macros and I don't understand the need of a macro here |
||
any GetInputEvent() const final { return any((TRestEvent*)nullptr); } \ | ||
any GetOutputEvent() const final { return any((TRestEvent*)nullptr); } \ | ||
void InitProcess() final{}; \ | ||
TRestEvent* ProcessEvent(TRestEvent* eventInput) final { \ | ||
RESTError << "You are trying to execute a legacy process " #thisname << RESTendl; \ | ||
RESTError << "This is not allow, this class is kept for backward compatibility" << RESTendl; \ | ||
exit(1); \ | ||
return nullptr; \ | ||
} \ | ||
void EndProcess() final{}; \ | ||
const char* GetProcessName() const final { return #thisname; } \ | ||
thisname() { \ | ||
RESTWarning << "Creating legacy process " #thisname << RESTendl; \ | ||
RESTWarning << "This process is now implemented under" #newname << RESTendl; \ | ||
} \ | ||
ClassDef(thisname, n) | ||
|
||
#endif |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,7 +26,7 @@ | |
#include "TRestLegacyProcess.h" | ||
|
||
//! A process to identify signal and remove baseline noise from a TRestRawSignalEvent. | ||
class TRestRawZeroSuppresionProcess : public TRestLegacyProcess { | ||
class TRestRawZeroSuppresionProcess : public TRestEventProcess { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
private: | ||
/// The ADC range used for baseline offset definition | ||
TVector2 fBaseLineRange; | ||
|
@@ -54,7 +54,7 @@ class TRestRawZeroSuppresionProcess : public TRestLegacyProcess { | |
|
||
public: | ||
/// It prints out the process parameters stored in the metadata structure | ||
void PrintMetadata() override { | ||
void PrintMetadata() { | ||
BeginPrintProcess(); | ||
RESTMetadata << "Base line range definition : ( " << fBaseLineRange.X() << " , " << fBaseLineRange.Y() | ||
<< " ) " << RESTendl; | ||
|
@@ -71,15 +71,6 @@ class TRestRawZeroSuppresionProcess : public TRestLegacyProcess { | |
EndPrintProcess(); | ||
} | ||
|
||
TRestRawZeroSuppresionProcess() { | ||
RESTWarning << "Creating legacy process TRestRawZeroSuppresionProcess" << RESTendl; | ||
RESTWarning << "This process is now implemented under TRestRawToDetectorSignalProcess" << RESTendl; | ||
} | ||
TRestRawZeroSuppresionProcess(char* cfgFileName) { | ||
RESTWarning << "Creating legacy process TRestRawZeroSuppresionProcess" << RESTendl; | ||
RESTWarning << "This process is now implemented under TRestRawToDetectorSignalProcess" << RESTendl; | ||
} | ||
|
||
ClassDefOverride(TRestRawZeroSuppresionProcess, 4); | ||
LegacyProcessDef(TRestRawZeroSuppresionProcess, TRestRawToDetectorSignalProcess, 4); | ||
}; | ||
#endif |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/************************************************************************* | ||
* This file is part of the REST software framework. * | ||
* * | ||
* Copyright (C) 2016 GIFNA/TREX (University of Zaragoza) * | ||
* For more information see http://gifna.unizar.es/trex * | ||
* * | ||
* REST is free software: you can redistribute it and/or modify * | ||
* it under the terms of the GNU General Public License as published by * | ||
* the Free Software Foundation, either version 3 of the License, or * | ||
* (at your option) any later version. * | ||
* * | ||
* REST is distributed in the hope that it will be useful, * | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of * | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * | ||
* GNU General Public License for more details. * | ||
* * | ||
* You should have a copy of the GNU General Public License along with * | ||
* REST in $REST_PATH/LICENSE. * | ||
* If not, see http://www.gnu.org/licenses/. * | ||
* For the list of contributors see $REST_PATH/CREDITS. * | ||
*************************************************************************/ | ||
|
||
#ifndef RestCore_TRestReadout | ||
#define RestCore_TRestReadout | ||
|
||
#include <iostream> | ||
|
||
#include "TObject.h" | ||
#include "TRestMetadata.h" | ||
#include "TRestDetectorReadout.h" | ||
|
||
/// A metadata class to generate/store a readout description. | ||
typedef TRestDetectorReadout TRestReadout; | ||
|
||
|
||
#endif |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/************************************************************************* | ||
* This file is part of the REST software framework. * | ||
* * | ||
* Copyright (C) 2016 GIFNA/TREX (University of Zaragoza) * | ||
* For more information see http://gifna.unizar.es/trex * | ||
* * | ||
* REST is free software: you can redistribute it and/or modify * | ||
* it under the terms of the GNU General Public License as published by * | ||
* the Free Software Foundation, either version 3 of the License, or * | ||
* (at your option) any later version. * | ||
* * | ||
* REST is distributed in the hope that it will be useful, * | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of * | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * | ||
* GNU General Public License for more details. * | ||
* * | ||
* You should have a copy of the GNU General Public License along with * | ||
* REST in $REST_PATH/LICENSE. * | ||
* If not, see http://www.gnu.org/licenses/. * | ||
* For the list of contributors see $REST_PATH/CREDITS. * | ||
*************************************************************************/ | ||
|
||
#ifndef RestCore_TRestReadoutChannel | ||
#define RestCore_TRestReadoutChannel | ||
|
||
#include <iostream> | ||
|
||
#include "TObject.h" | ||
#include "TRestMetadata.h" | ||
|
||
#include "TRestDetectorReadoutChannel.h" | ||
|
||
typedef TRestDetectorReadoutChannel TRestReadoutChannel; | ||
|
||
#endif |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/************************************************************************* | ||
* This file is part of the REST software framework. * | ||
* * | ||
* Copyright (C) 2016 GIFNA/TREX (University of Zaragoza) * | ||
* For more information see http://gifna.unizar.es/trex * | ||
* * | ||
* REST is free software: you can redistribute it and/or modify * | ||
* it under the terms of the GNU General Public License as published by * | ||
* the Free Software Foundation, either version 3 of the License, or * | ||
* (at your option) any later version. * | ||
* * | ||
* REST is distributed in the hope that it will be useful, * | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of * | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * | ||
* GNU General Public License for more details. * | ||
* * | ||
* You should have a copy of the GNU General Public License along with * | ||
* REST in $REST_PATH/LICENSE. * | ||
* If not, see http://www.gnu.org/licenses/. * | ||
* For the list of contributors see $REST_PATH/CREDITS. * | ||
*************************************************************************/ | ||
|
||
#ifndef RestCore_TRestReadoutMapping | ||
#define RestCore_TRestReadoutMapping | ||
|
||
#include <iostream> | ||
|
||
#include <TMatrixD.h> | ||
#include <TObject.h> | ||
|
||
#include "TRestDetectorReadoutMapping.h" | ||
|
||
typedef TRestDetectorReadoutMapping TRestReadoutMapping; | ||
|
||
|
||
#endif |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/************************************************************************* | ||
* This file is part of the REST software framework. * | ||
* * | ||
* Copyright (C) 2016 GIFNA/TREX (University of Zaragoza) * | ||
* For more information see http://gifna.unizar.es/trex * | ||
* * | ||
* REST is free software: you can redistribute it and/or modify * | ||
* it under the terms of the GNU General Public License as published by * | ||
* the Free Software Foundation, either version 3 of the License, or * | ||
* (at your option) any later version. * | ||
* * | ||
* REST is distributed in the hope that it will be useful, * | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of * | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * | ||
* GNU General Public License for more details. * | ||
* * | ||
* You should have a copy of the GNU General Public License along with * | ||
* REST in $REST_PATH/LICENSE. * | ||
* If not, see http://www.gnu.org/licenses/. * | ||
* For the list of contributors see $REST_PATH/CREDITS. * | ||
*************************************************************************/ | ||
|
||
#ifndef RestCore_TRestReadoutModule | ||
#define RestCore_TRestReadoutModule | ||
|
||
#include <iostream> | ||
|
||
#include <TMath.h> | ||
#include "TObject.h" | ||
|
||
#include <TVector2.h> | ||
|
||
#include "TRestDetectorReadoutModule.h" | ||
|
||
typedef TRestDetectorReadoutModule TRestReadoutModule; | ||
|
||
#endif |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/************************************************************************* | ||
* This file is part of the REST software framework. * | ||
* * | ||
* Copyright (C) 2016 GIFNA/TREX (University of Zaragoza) * | ||
* For more information see http://gifna.unizar.es/trex * | ||
* * | ||
* REST is free software: you can redistribute it and/or modify * | ||
* it under the terms of the GNU General Public License as published by * | ||
* the Free Software Foundation, either version 3 of the License, or * | ||
* (at your option) any later version. * | ||
* * | ||
* REST is distributed in the hope that it will be useful, * | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of * | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * | ||
* GNU General Public License for more details. * | ||
* * | ||
* You should have a copy of the GNU General Public License along with * | ||
* REST in $REST_PATH/LICENSE. * | ||
* If not, see http://www.gnu.org/licenses/. * | ||
* For the list of contributors see $REST_PATH/CREDITS. * | ||
*************************************************************************/ | ||
|
||
#ifndef RestCore_TRestReadoutPixel | ||
#define RestCore_TRestReadoutPixel | ||
|
||
#include <iostream> | ||
|
||
#include "TRestDetectorReadoutPixel.h" | ||
|
||
typedef TRestDetectorReadoutPixel TRestReadoutPixel; | ||
|
||
#endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that is conceptually wrong to add dependencies to any legacy class or library
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, probably we just need the data members and the name of the class being preserved for data being read from previous ROOT files.