#ifndef DETECTOR_SIGNAL_ATTENUATORS_2007_02_16 #define DETECTOR_SIGNAL_ATTENUATORS_2007_02_16 /** @file DetectorAtten.h @author Brian Magill @datecreated 02/16/2007 $Date:$ $Revision:$ @copyright (©) Copyright 2006 by GATS Inc. 11864 Canon Blvd., Suite 101, Newport News, VA 23606 All Rights Reserved. No part of this software or publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise without the prior written permission of GATS Inc. @brief Contains the detector signal attenuations for an event */ //---------------------------------------------------------------------- // #include #include #include #include class DetectorAtten { private: std::vector atten; public: // DetectorAtten( ):atten(0) { }; explicit DetectorAtten(unsigned long n = 0):atten(n) { }; DetectorAtten(std::vector const& inAtten):atten(inAtten) { }; DetectorAtten(DetectorAtten const& rhs ):atten(rhs.atten) { }; DetectorAtten& operator = (DetectorAtten const& rhs ) { if(&rhs == this) return *this; atten = rhs.atten; return *this; }; ~DetectorAtten() { }; // void add(double x) { atten.push_back(x); }; // double operator () (int indx) const {return atten.at(indx); }; double & operator [ ] (int indx) {return atten.at(indx); }; const double & operator [] (int indx) const {return atten.at(indx); }; std::vector getAll() const { return atten; }; unsigned long size() const { return atten.size(); }; void dump() const { for(unsigned long i = 0; i < size(); i++) std::cout << i << "\t" << atten[i] << std::endl; }; }; #endif