-
Notifications
You must be signed in to change notification settings - Fork 62
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
GMT #680
Open
nigmatkulov
wants to merge
11
commits into
main
Choose a base branch
from
GMT
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
GMT #680
Changes from 1 commit
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
591afa9
StarDb added
7b302dd
Addressing stylish comments
0a15563
Revert changes due to the inheritance issue
nigmatkulov 875a7e4
Fixing EventT
nigmatkulov 20dffdf
Moving from the ROOT to C++ type declaration
nigmatkulov b1fb23b
Update missing parts
nigmatkulov 6ad10c0
Commenting out unused histo
nigmatkulov be2bf1c
Stylish modifications
nigmatkulov b8ebc77
Fix typo
nigmatkulov 48a7271
Make preprocessor directive to hide code parts
nigmatkulov 6728fed
Trying to clean up more
nigmatkulov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
/** | ||
* \class StGmtColection | ||
* \brief Holds collections of GMT data | ||
* | ||
* GMT data collection for StEvent (based on StFgtCollection) | ||
* | ||
* \author K.S. Engle, Jan. 2013 | ||
* \author Richard Witt ([email protected]), Jan. 2013 | ||
* \author Grigory Nigmatkulov ([email protected]), Dec. 2020 | ||
*/ | ||
|
||
// Load header of the GMT collection | ||
#include "StGmtCollection.h" | ||
|
||
ClassImp(StGmtCollection) | ||
|
||
//________________ | ||
StGmtCollection::StGmtCollection() : StObject() { | ||
// Set the module field for some of the collections | ||
for( int i=0; i<kGmtNumModules; ++i ) { | ||
mStripCollection[i].setModule( i ); | ||
mHitCollection[i].setModule( i ); | ||
} | ||
} | ||
|
||
//________________ | ||
StGmtCollection::~StGmtCollection() { | ||
/* empty */ | ||
} | ||
|
||
//__________ | ||
void StGmtCollection::Clear( Option_t *opt ) { | ||
for( int i=0; i<kGmtNumModules; ++i ){ | ||
mStripCollection[i].Clear( opt ); | ||
mHitCollection[i].Clear( opt ); | ||
} | ||
mPointCollection.Clear( opt ); | ||
} | ||
|
||
//________________ | ||
size_t StGmtCollection::getNumStrips() const { | ||
size_t n = 0; | ||
for( const StGmtStripCollection* ptr = &mStripCollection[0]; | ||
ptr != &mStripCollection[kGmtNumModules]; ++ptr ) { | ||
n += ptr->getNumStrips(); | ||
} | ||
return n; | ||
} | ||
|
||
//________________ | ||
size_t StGmtCollection::getNumHits() const { | ||
size_t n = 0; | ||
for( const StGmtHitCollection* ptr = &mHitCollection[0]; | ||
ptr != &mHitCollection[kGmtNumModules]; ++ptr ) { | ||
n += ptr->getNumHits(); | ||
} | ||
return n; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
/** | ||
* \class StGmtCollection | ||
* \brief Holds collections of GMT data | ||
* | ||
* GMT data collection for StEvent (based on StFgtCollection) | ||
* | ||
* \author K.S. Engle, Jan. 2013 | ||
* \author Richard Witt ([email protected]), Jan. 2013 | ||
* \author Grigory Nigmatkulov ([email protected]), Dec. 2020 | ||
*/ | ||
|
||
#ifndef StGmtCollection_hh | ||
#define StGmtCollection_hh | ||
|
||
// StRoot headers | ||
#include "StObject.h" | ||
#include "StGmtStripCollection.h" | ||
#include "StGmtHitCollection.h" | ||
#include "StGmtPointCollection.h" | ||
#include "StEnumerations.h" | ||
|
||
//________________ | ||
class StGmtCollection : public StObject { | ||
public: | ||
/// Constructor | ||
StGmtCollection(); | ||
// StGmtCollection( const StGmtCollection& other ); ---> use default | ||
// StGmtCollection& operator=( const StGmtCollection& other ); ---> use default | ||
|
||
/// Destructor | ||
~StGmtCollection(); | ||
|
||
/// Number of modules | ||
size_t getNumModules() const { return kGmtNumModules; } | ||
/// Number total number of strips | ||
size_t getNumStrips() const; | ||
/// Number of strips in the i-th module | ||
size_t getNumStrips( unsigned short moduleIdx) const | ||
{ return (moduleIdx < kGmtNumModules ? mStripCollection[moduleIdx].getNumStrips() : 0 ); } | ||
/// Number total number of hits | ||
size_t getNumHits() const; | ||
/// Number of hits in the i-th module | ||
size_t getNumHits( unsigned short moduleIdx ) const | ||
{ return (moduleIdx < kGmtNumModules ? mHitCollection[moduleIdx].getNumHits() : 0 ); } | ||
/// Number of points | ||
size_t getNumPoints() const | ||
{ return mPointCollection.getNumPoints(); } | ||
|
||
// note: ownership of all pointers is retained by the containers. | ||
// Do not delete any pointers received from this class. | ||
|
||
/// Pointer to the GMT strip collection in the i-th module | ||
StGmtStripCollection* getStripCollection( unsigned short moduleIdx ) | ||
{ return (moduleIdx < kGmtNumModules ? &mStripCollection[moduleIdx] : 0 ); } | ||
/// Pointer to the GMT strip collection in the i-th module | ||
const StGmtStripCollection* getStripCollection( unsigned short moduleIdx ) const | ||
{ return (moduleIdx < kGmtNumModules ? &mStripCollection[moduleIdx] : 0 ); } | ||
|
||
/// Pointer to the GMT hit collection in the i-th module | ||
StGmtHitCollection* getHitCollection( unsigned short moduleIdx ) | ||
{ return (moduleIdx < kGmtNumModules ? &mHitCollection[moduleIdx] : 0 ); } | ||
/// Pointer to the GMT hit collection in the i-th module | ||
const StGmtHitCollection* getHitCollection( unsigned short moduleIdx ) const | ||
{ return (moduleIdx < kGmtNumModules ? &mHitCollection[moduleIdx] : 0 ); } | ||
|
||
/// Pointer to the GMT point collection | ||
StGmtPointCollection* getPointCollection() { return &mPointCollection; } | ||
/// Pointer to the GMT point collection | ||
const StGmtPointCollection* getPointCollection() const { return &mPointCollection; } | ||
|
||
/// Clear method | ||
void Clear( Option_t *opts = "" ); | ||
|
||
protected: | ||
|
||
/// Friend class of the StMuDSTMaker | ||
friend class StMuDstMaker; | ||
|
||
/// GMT strip collections for all modules | ||
StGmtStripCollection mStripCollection[kGmtNumModules]; | ||
/// GMT hit collections for all modules | ||
StGmtHitCollection mHitCollection[kGmtNumModules]; | ||
/// GMT point collection | ||
StGmtPointCollection mPointCollection; | ||
|
||
private: | ||
ClassDef(StGmtCollection,1) | ||
}; | ||
|
||
#endif // #define StGmtCollection_hh |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 suggest removing rather than commenting ifdefs.
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.
Removed most of those and left only a few that are needed for debug and analysis purpose