Adding #include “Tobject.h” resolved issues with 2D vectors and strings (#include being present). This is the output I’m currently getting when i run root-config --cxx --cflags
-O2 -W -Wall -c CoreasEvent.cpp
CoreasEvent.h:10: error: âstringâ does not name a type
CoreasEvent.h:17: error: ISO C++ forbids declaration of âvectorâ with no type
CoreasEvent.h:17: error: expected â;â before â<â token
CoreasEvent.h:18: error: ISO C++ forbids declaration of âvectorâ with no type
CoreasEvent.h:18: error: expected â;â before â<â token
CoreasEvent.h:19: error: ISO C++ forbids declaration of âvectorâ with no type
CoreasEvent.h:19: error: expected â;â before â<â token
CoreasEvent.h:20: error: ISO C++ forbids declaration of âvectorâ with no type
CoreasEvent.h:20: error: expected â;â before â<â token
CoreasEvent.h:21: error: ISO C++ forbids declaration of âvectorâ with no type
CoreasEvent.h:21: error: expected â;â before â<â token
CoreasEvent.h:22: error: ISO C++ forbids declaration of âvectorâ with no type
CoreasEvent.h:22: error: expected â;â before â<â token
CoreasEvent.h:23: error: ISO C++ forbids declaration of âvectorâ with no type
CoreasEvent.h:23: error: expected â;â before â<â token
CoreasEvent.h:24: error: ISO C++ forbids declaration of âvectorâ with no type
CoreasEvent.h:24: error: expected â;â before â<â token
CoreasEvent.h:25: error: ISO C++ forbids declaration of âvectorâ with no type
CoreasEvent.h:25: error: expected â;â before â<â token
CoreasEvent.h:26: error: ISO C++ forbids declaration of âvectorâ with no type
CoreasEvent.h:26: error: expected â;â before â<â token
CoreasEvent.h:27: error: ISO C++ forbids declaration of âvectorâ with no type
CoreasEvent.h:27: error: expected â;â before â<â token
CoreasEvent.h:33: error: âstringâ has not been declared
CoreasEvent.h:40: error: âstringâ does not name a type
CoreasEvent.h:68: error: ISO C++ forbids declaration of âvectorâ with no type
CoreasEvent.h:68: error: expected â;â before â<â token
CoreasEvent.h:72: error: expected `;' before âvectorâ
CoreasEvent.h:72: error: ISO C++ forbids declaration of âvectorâ with no type
CoreasEvent.h:72: error: expected â;â before â<â token
CoreasEvent.h:76: error: expected `;' before âvectorâ
CoreasEvent.h:76: error: ISO C++ forbids declaration of âvectorâ with no type
CoreasEvent.h:76: error: expected â;â before â<â token
CoreasEvent.h:80: error: expected `;' before âvectorâ
CoreasEvent.h:80: error: ISO C++ forbids declaration of âvectorâ with no type
CoreasEvent.h:80: error: expected â;â before â<â token
CoreasEvent.h:84: error: expected `;' before âvectorâ
CoreasEvent.h:84: error: ISO C++ forbids declaration of âvectorâ with no type
CoreasEvent.h:84: error: expected â;â before â<â token
CoreasEvent.h:88: error: expected `;' before âvectorâ
CoreasEvent.h:88: error: ISO C++ forbids declaration of âvectorâ with no type
CoreasEvent.h:88: error: expected â;â before â<â token
CoreasEvent.h:92: error: expected `;' before âvectorâ
CoreasEvent.h:92: error: ISO C++ forbids declaration of âvectorâ with no type
CoreasEvent.h:92: error: expected â;â before â<â token
CoreasEvent.h:96: error: expected `;' before âvectorâ
CoreasEvent.h:96: error: ISO C++ forbids declaration of âvectorâ with no type
CoreasEvent.h:96: error: expected â;â before â<â token
CoreasEvent.h:100: error: expected `;' before âvectorâ
CoreasEvent.h:100: error: ISO C++ forbids declaration of âvectorâ with no type
CoreasEvent.h:100: error: expected â;â before â<â token
CoreasEvent.h:104: error: expected `;' before âvectorâ
CoreasEvent.h:104: error: ISO C++ forbids declaration of âvectorâ with no type
CoreasEvent.h:104: error: expected â;â before â<â token
CoreasEvent.h:108: error: expected `;' before âvectorâ
CoreasEvent.h:108: error: ISO C++ forbids declaration of âvectorâ with no type
CoreasEvent.h:108: error: expected â;â before â<â token
CoreasEvent.h:113: error: expected `;' before âvoidâ
CoreasEvent.h:114: error: âstringâ has not been declared
CoreasEvent.h:121: error: âvectorâ has not been declared
CoreasEvent.h:121: error: expected â,â or â...â before â<â token
CoreasEvent.h:122: error: âvectorâ has not been declared
CoreasEvent.h:122: error: expected â,â or â...â before â<â token
CoreasEvent.h:123: error: âvectorâ has not been declared
CoreasEvent.h:123: error: expected â,â or â...â before â<â token
CoreasEvent.h:124: error: âvectorâ has not been declared
CoreasEvent.h:124: error: expected â,â or â...â before â<â token
CoreasEvent.h:125: error: âvectorâ has not been declared
CoreasEvent.h:125: error: expected â,â or â...â before â<â token
CoreasEvent.h:126: error: âvectorâ has not been declared
CoreasEvent.h:126: error: expected â,â or â...â before â<â token
CoreasEvent.h:127: error: âvectorâ has not been declared
CoreasEvent.h:127: error: expected â,â or â...â before â<â token
CoreasEvent.h:128: error: âvectorâ has not been declared
CoreasEvent.h:128: error: expected â,â or â...â before â<â token
CoreasEvent.h:129: error: âvectorâ has not been declared
CoreasEvent.h:129: error: expected â,â or â...â before â<â token
CoreasEvent.h:130: error: âvectorâ has not been declared
CoreasEvent.h:130: error: expected â,â or â...â before â<â token
CoreasEvent.h:131: error: âvectorâ has not been declared
CoreasEvent.h:131: error: expected â,â or â...â before â<â token
CoreasEvent.h: In member function âInt_t CoreasEvent::getEnergy()â:
CoreasEvent.h:38: warning: converting to âInt_tâ from âDouble_tâ
CoreasEvent.cpp: In constructor âCoreasEvent::CoreasEvent()â:
CoreasEvent.cpp:9: error: âseedâ was not declared in this scope
CoreasEvent.cpp: At global scope:
CoreasEvent.cpp:17: error: prototype for âCoreasEvent::CoreasEvent(Double_t, std::string, Double_t, Double_t, Int_t, Double_t, Double_t, Double_t)â does not match any in class âCoreasEventâ
CoreasEvent.h:7: error: candidates are: CoreasEvent::CoreasEvent(const CoreasEvent&)
CoreasEvent.h:33: error: CoreasEvent::CoreasEvent(Double_t, int, Double_t, Double_t, Int_t, Double_t, Double_t, Double_t)
CoreasEvent.cpp:6: error: CoreasEvent::CoreasEvent()
CoreasEvent.cpp: In constructor âCoreasEvent::CoreasEvent(Double_t, std::string, Double_t, Double_t, Int_t, Double_t, Double_t, Double_t)â:
CoreasEvent.cpp:20: error: âseedâ was not declared in this scope
CoreasEvent.cpp: In member function âvoid CoreasEvent::reset()â:
CoreasEvent.cpp:32: error: âseedâ was not declared in this scope
CoreasEvent.cpp:39: error: âmagFieldâ was not declared in this scope
CoreasEvent.cpp:40: error: âxFreqâ was not declared in this scope
CoreasEvent.cpp:41: error: âxFEXâ was not declared in this scope
CoreasEvent.cpp:42: error: âxFEYâ was not declared in this scope
CoreasEvent.cpp:43: error: âxFEZâ was not declared in this scope
CoreasEvent.cpp:44: error: âxFEHâ was not declared in this scope
CoreasEvent.cpp:45: error: âxTimeâ was not declared in this scope
CoreasEvent.cpp:46: error: âxTEXâ was not declared in this scope
CoreasEvent.cpp:47: error: âxTEYâ was not declared in this scope
CoreasEvent.cpp:48: error: âxTEZâ was not declared in this scope
CoreasEvent.cpp:49: error: âxTEHâ was not declared in this scope
CoreasEvent.cpp: At global scope:
CoreasEvent.cpp:71: error: prototype for âvoid CoreasEvent::setSeed(std::string)â does not match any in class âCoreasEventâ
CoreasEvent.h:114: error: candidate is: void CoreasEvent::setSeed(int)
CoreasEvent.cpp: In member function âvoid CoreasEvent::setSeed(std::string)â:
CoreasEvent.cpp:73: error: âseedâ was not declared in this scope
CoreasEvent.cpp: At global scope:
CoreasEvent.cpp:99: error: prototype for âvoid CoreasEvent::setMagField(std::vector<double, std::allocator<double> >)â does not match any in class âCoreasEventâ
CoreasEvent.h:121: error: candidate is: void CoreasEvent::setMagField(int)
CoreasEvent.cpp: In member function âvoid CoreasEvent::setMagField(std::vector<double, std::allocator<double> >)â:
CoreasEvent.cpp:101: error: âmagFieldâ was not declared in this scope
CoreasEvent.cpp: At global scope:
CoreasEvent.cpp:103: error: ânewXFreqâ was not declared in this scope
CoreasEvent.cpp:103: error: â>>â should be â> >â within a nested template argument list
CoreasEvent.cpp:103: error: prototype for âvoid CoreasEvent::setXFreq(std::vector<std::vector<double, std::allocator<double> >, std::allocator<std::vector<double, std::allocator<double> > > >)â does not match any in class âCoreasEventâ
CoreasEvent.h:122: error: candidate is: void CoreasEvent::setXFreq(int)
CoreasEvent.cpp: In member function âvoid CoreasEvent::setXFreq(std::vector<std::vector<double, std::allocator<double> >, std::allocator<std::vector<double, std::allocator<double> > > >)â:
CoreasEvent.cpp:105: error: âxFreqâ was not declared in this scope
CoreasEvent.cpp: At global scope:
CoreasEvent.cpp:107: error: ânewXFEXâ was not declared in this scope
CoreasEvent.cpp:107: error: â>>â should be â> >â within a nested template argument list
CoreasEvent.cpp:107: error: prototype for âvoid CoreasEvent::setXFEX(std::vector<std::vector<double, std::allocator<double> >, std::allocator<std::vector<double, std::allocator<double> > > >)â does not match any in class âCoreasEventâ
CoreasEvent.h:123: error: candidate is: void CoreasEvent::setXFEX(int)
CoreasEvent.cpp: In member function âvoid CoreasEvent::setXFEX(std::vector<std::vector<double, std::allocator<double> >, std::allocator<std::vector<double, std::allocator<double> > > >)â:
CoreasEvent.cpp:109: error: âxFEXâ was not declared in this scope
CoreasEvent.cpp: At global scope:
CoreasEvent.cpp:111: error: ânewXFEYâ was not declared in this scope
CoreasEvent.cpp:111: error: â>>â should be â> >â within a nested template argument list
CoreasEvent.cpp:111: error: prototype for âvoid CoreasEvent::setXFEY(std::vector<std::vector<double, std::allocator<double> >, std::allocator<std::vector<double, std::allocator<double> > > >)â does not match any in class âCoreasEventâ
CoreasEvent.h:124: error: candidate is: void CoreasEvent::setXFEY(int)
CoreasEvent.cpp: In member function âvoid CoreasEvent::setXFEY(std::vector<std::vector<double, std::allocator<double> >, std::allocator<std::vector<double, std::allocator<double> > > >)â:
CoreasEvent.cpp:113: error: âxFEYâ was not declared in this scope
CoreasEvent.cpp: At global scope:
CoreasEvent.cpp:115: error: ânewXFEZâ was not declared in this scope
CoreasEvent.cpp:115: error: â>>â should be â> >â within a nested template argument list
CoreasEvent.cpp:115: error: prototype for âvoid CoreasEvent::setXFEZ(std::vector<std::vector<double, std::allocator<double> >, std::allocator<std::vector<double, std::allocator<double> > > >)â does not match any in class âCoreasEventâ
CoreasEvent.h:125: error: candidate is: void CoreasEvent::setXFEZ(int)
CoreasEvent.cpp: In member function âvoid CoreasEvent::setXFEZ(std::vector<std::vector<double, std::allocator<double> >, std::allocator<std::vector<double, std::allocator<double> > > >)â:
CoreasEvent.cpp:117: error: âxFEZâ was not declared in this scope
CoreasEvent.cpp: At global scope:
CoreasEvent.cpp:119: error: ânewXFEHâ was not declared in this scope
CoreasEvent.cpp:119: error: â>>â should be â> >â within a nested template argument list
CoreasEvent.cpp:119: error: prototype for âvoid CoreasEvent::setXFEH(std::vector<std::vector<double, std::allocator<double> >, std::allocator<std::vector<double, std::allocator<double> > > >)â does not match any in class âCoreasEventâ
CoreasEvent.h:126: error: candidate is: void CoreasEvent::setXFEH(int)
CoreasEvent.cpp: In member function âvoid CoreasEvent::setXFEH(std::vector<std::vector<double, std::allocator<double> >, std::allocator<std::vector<double, std::allocator<double> > > >)â:
CoreasEvent.cpp:121: error: âxFEHâ was not declared in this scope
CoreasEvent.cpp: At global scope:
CoreasEvent.cpp:123: error: ânewXTimeâ was not declared in this scope
CoreasEvent.cpp:123: error: â>>â should be â> >â within a nested template argument list
CoreasEvent.cpp:123: error: prototype for âvoid CoreasEvent::setXTime(std::vector<std::vector<double, std::allocator<double> >, std::allocator<std::vector<double, std::allocator<double> > > >)â does not match any in class âCoreasEventâ
CoreasEvent.h:127: error: candidate is: void CoreasEvent::setXTime(int)
CoreasEvent.cpp: In member function âvoid CoreasEvent::setXTime(std::vector<std::vector<double, std::allocator<double> >, std::allocator<std::vector<double, std::allocator<double> > > >)â:
CoreasEvent.cpp:125: error: âxTimeâ was not declared in this scope
CoreasEvent.cpp: At global scope:
CoreasEvent.cpp:127: error: ânewXTEXâ was not declared in this scope
CoreasEvent.cpp:127: error: â>>â should be â> >â within a nested template argument list
CoreasEvent.cpp:127: error: prototype for âvoid CoreasEvent::setXTEX(std::vector<std::vector<double, std::allocator<double> >, std::allocator<std::vector<double, std::allocator<double> > > >)â does not match any in class âCoreasEventâ
CoreasEvent.h:128: error: candidate is: void CoreasEvent::setXTEX(int)
CoreasEvent.cpp: In member function âvoid CoreasEvent::setXTEX(std::vector<std::vector<double, std::allocator<double> >, std::allocator<std::vector<double, std::allocator<double> > > >)â:
CoreasEvent.cpp:129: error: âxTEXâ was not declared in this scope
CoreasEvent.cpp: At global scope:
CoreasEvent.cpp:131: error: ânewXTEYâ was not declared in this scope
CoreasEvent.cpp:131: error: â>>â should be â> >â within a nested template argument list
CoreasEvent.cpp:131: error: prototype for âvoid CoreasEvent::setXTEY(std::vector<std::vector<double, std::allocator<double> >, std::allocator<std::vector<double, std::allocator<double> > > >)â does not match any in class âCoreasEventâ
CoreasEvent.h:129: error: candidate is: void CoreasEvent::setXTEY(int)
CoreasEvent.cpp: In member function âvoid CoreasEvent::setXTEY(std::vector<std::vector<double, std::allocator<double> >, std::allocator<std::vector<double, std::allocator<double> > > >)â:
CoreasEvent.cpp:133: error: âxTEYâ was not declared in this scope
CoreasEvent.cpp: At global scope:
CoreasEvent.cpp:135: error: ânewXTEZâ was not declared in this scope
CoreasEvent.cpp:135: error: â>>â should be â> >â within a nested template argument list
CoreasEvent.cpp:135: error: prototype for âvoid CoreasEvent::setXTEZ(std::vector<std::vector<double, std::allocator<double> >, std::allocator<std::vector<double, std::allocator<double> > > >)â does not match any in class âCoreasEventâ
CoreasEvent.h:130: error: candidate is: void CoreasEvent::setXTEZ(int)
CoreasEvent.cpp: In member function âvoid CoreasEvent::setXTEZ(std::vector<std::vector<double, std::allocator<double> >, std::allocator<std::vector<double, std::allocator<double> > > >)â:
CoreasEvent.cpp:137: error: âxTEZâ was not declared in this scope
CoreasEvent.cpp: At global scope:
CoreasEvent.cpp:139: error: ânewXTEHâ was not declared in this scope
CoreasEvent.cpp:139: error: â>>â should be â> >â within a nested template argument list
CoreasEvent.cpp:139: error: prototype for âvoid CoreasEvent::setXTEH(std::vector<std::vector<double, std::allocator<double> >, std::allocator<std::vector<double, std::allocator<double> > > >)â does not match any in class âCoreasEventâ
CoreasEvent.h:131: error: candidate is: void CoreasEvent::setXTEH(int)
CoreasEvent.cpp: In member function âvoid CoreasEvent::setXTEH(std::vector<std::vector<double, std::allocator<double> >, std::allocator<std::vector<double, std::allocator<double> > > >)â:
CoreasEvent.cpp:141: error: âxTEHâ was not declared in this scope
CoreasEvent.cpp: In member function âvoid CoreasEvent::print()â:
CoreasEvent.cpp:146: error: âgetSeedâ was not declared in this scope
CoreasEvent.cpp:154: error: âgetMagFieldâ was not declared in this scope
All the errors seem to point to string and vector.
For reference I am running the code on gcc 4.1.2