Linear Collider Forum



Home » General » General Questions » Class not found
Class not found [message #1748] Mon, 01 June 2009 12:43 Go to next message
bweinert
Messages: 16
Registered: September 2008
Location: University of Rochester
Hi I'm a undergraduate working for Professor Steve Manly at the University of Rochester. I tried running a few programs, including MuonReco, and I run into the error Class not found. The programs compile fine but they won't run. At first I thought that this was because I tried running programs that weren't drivers, but MuonReco is a driver. What does this mean, and how can I fix something like this? Thank you.

-Ben

  • Attachment: MuonReco.java
    (Size: 10.37KB, Downloaded 746 times)
Re: Class not found [message #1749 is a reply to message #1748] Tue, 02 June 2009 00:51 Go to previous messageGo to next message
jfstrube
Messages: 64
Registered: September 2004
Location: Tohoku University
Hi Ben,

I'm sorry, I'm not really sure what exactly you are doing.
Are you trying to execute that code in JAS3?

The reason why you encounter a class not found is that you have put the code into a subpackage. (See the first line in your code)
JAS3 doesn't know where to look for your code, if you don't explicitly tell it. You can do that in File->Load->Set Classpath

packages are directories in Java, so Jas will expect to find a .class file somewhere in org/lcsim/recon/muon.

If you just want to load the code into JAS3 and run it there, I would recommend removing the package statement at the top. If, on the other hand, you want to develop the code for inclusion in org.lcsim, the easiest way would be to follow
http://confluence.slac.stanford.edu/display/ilc/Creating+a+D river+using+Netbeans

Good luck.
Jan
Re: Class not found [message #1752 is a reply to message #1749] Tue, 02 June 2009 11:17 Go to previous messageGo to next message
bweinert
Messages: 16
Registered: September 2008
Location: University of Rochester
Hi, I commented out the top line and added all the import statements to get the program to compile. It compiles and it runs, but the loop terminates due to error early on in the program. It says:

java.lang.IllegalArgumentException: Unknown event component Tracks
at hep.physics.event.BaseEvent.get(BaseEvent.java:48)
at org.lcsim.event.base.BaseLCSimEvent.get(BaseLCSimEvent.java: 100)
at org.lcsim.event.base.BaseLCSimEvent.getTracks(BaseLCSimEvent .java:80)
at MuonReco.process(MuonReco.java:74)
at org.lcsim.util.DriverAdapter.recordSupplied(DriverAdapter.ja va:74)
at org.freehep.jas.extensions.recordloop.MyChain.recordSupplied (MyChain.java:55)
at org.freehep.jas.extensions.recordloop.InteractiveRecordLoop. supplyRecord(InteractiveRecordLoop.java:533)
at org.freehep.jas.extensions.recordloop.RecordLoopManager.run( RecordLoopManager.java:66)
at java.lang.Thread.run(Unknown Source)

How would I go about fixing this error, is there a problem with all of the programs that MuonReco calls?

Also, it seemed like there was some confusion about what I was trying to do with this code. I was under the impression that I should execute this code in JAS3. Is this wrong, is this code supposed to be run in something else or is it just batch code? Thank you for your help.

-Ben
Re: Class not found [message #1753 is a reply to message #1752] Tue, 02 June 2009 13:40 Go to previous messageGo to next message
tonyj
Messages: 138
Registered: January 2004

bweinert wrote on Tue, 02 June 2009 11:17

Hi, I commented out the top line and added all the import statements to get the program to compile. It compiles and it runs, but the loop terminates due to error early on in the program. It says:

java.lang.IllegalArgumentException: Unknown event component Tracks
at hep.physics.event.BaseEvent.get(BaseEvent.java:48)
at org.lcsim.event.base.BaseLCSimEvent.get(BaseLCSimEvent.java: 100)
at org.lcsim.event.base.BaseLCSimEvent.getTracks(BaseLCSimEvent .java:80)
at MuonReco.process(MuonReco.java:74)
at org.lcsim.util.DriverAdapter.recordSupplied(DriverAdapter.ja va:74)
at org.freehep.jas.extensions.recordloop.MyChain.recordSupplied (MyChain.java:55)
at org.freehep.jas.extensions.recordloop.InteractiveRecordLoop. supplyRecord(InteractiveRecordLoop.java:533)
at org.freehep.jas.extensions.recordloop.RecordLoopManager.run( RecordLoopManager.java:66)
at java.lang.Thread.run(Unknown Source)

How would I go about fixing this error, is there a problem with all of the programs that MuonReco calls?


HI, what this error means is that MuonReco processor is attempting to access the track list "Tracks" from the event, however the event you are reading do not contain any "Tracks". This is most likely because you are reading events generated from SLIC (simulation) but have not run the tracking algorithm on the event.

Quote:


Also, it seemed like there was some confusion about what I was trying to do with this code. I was under the impression that I should execute this code in JAS3. Is this wrong, is this code supposed to be run in something else or is it just batch code? Thank you for your help.
-Ben

You should be able to compile and run code in JAS3. If you are still getting errors please attach the complete error message here.

Tony
Re: Class not found [message #1754 is a reply to message #1753] Wed, 03 June 2009 06:58 Go to previous messageGo to next message
bweinert
Messages: 16
Registered: September 2008
Location: University of Rochester
Sorry to keep on bringing this up, but is there a program which I left out that I should be running to do this tracking algorithm or do I have to write an algorithm to do it? It was also suggested that the code might be old and the tracking programs that were used have been replaced by new programs. If so, are there any new programs, within the past 3 years, that have replaced those that are used in the code? Thank you for your time and help.

-Ben
Re: Class not found [message #1756 is a reply to message #1754] Wed, 03 June 2009 09:27 Go to previous messageGo to next message
tonyj
Messages: 138
Registered: January 2004

bweinert wrote on Wed, 03 June 2009 06:58

Sorry to keep on bringing this up, but is there a program which I left out that I should be running to do this tracking algorithm or do I have to write an algorithm to do it? It was also suggested that the code might be old and the tracking programs that were used have been replaced by new programs. If so, are there any new programs, within the past 3 years, that have replaced those that are used in the code? Thank you for your time and help.

-Ben


Hi Ben, no problem about the questions, that is what the forum is for.

No you do not have to write the tracking algorithm, it should already exist. Lots of work has been done on tracking in the last three years, but probably not much work on documentation, so it is probably not easy to figure out how to call the tracking algorithms you need.

We will try to get together an example of how to call the tracking which has been used for the recent SiD LOI.
Re: Class not found [message #1757 is a reply to message #1756] Wed, 03 June 2009 09:41 Go to previous messageGo to next message
partridge
Messages: 11
Registered: October 2005
To run the standard track reconstruction processing, you can use the following driver:

org.lcsim.recon.tracking.seedtracker.ReconTracking.SiD02Reco nTrackingDriver

If you load this driver in Jas and then process an event, you should be able to see that tracks are reconstructed using either the wired event display or the event browser.
Re: Class not found [message #1767 is a reply to message #1757] Fri, 19 June 2009 06:13 Go to previous messageGo to next message
bweinert
Messages: 16
Registered: September 2008
Location: University of Rochester
Hi, I've run into a new problem. I'm running muon reconstruction, but nothing ever makes it to the muon list. The data all seems to be right, I've done distributions of theta, rho, momentum, phi and all of them seem normal. It creates the virtual hits, I'm pretty sure that the problem is with the matching in BarrelSegmentFinder. I put a few changes in BarrelSegmentFinder and compiled and ran it. The only thing is that it doesn't seem like the muon reconstruction program calls the new and improved version of the BarrelSegmentFinder, it calls the original one. I tried saving and overriding the BarrelSegmentFinder and that did nothing. I also tried changing its name and creating a new file. The problem with that was that when I tried importing it and compiling muonreco, the compiler said that it didn't recognize the new variable BarrelSegmentFinder1. Is this because it isn't part of the original build, although I saved it in the right spot and called it correctly? Is there anything I should do?

Thank you for your time and help.

-Ben
Re: Class not found [message #1770 is a reply to message #1767] Mon, 22 June 2009 16:55 Go to previous messageGo to next message
tonyj
Messages: 138
Registered: January 2004

Hi Ben, I am not sure exactly what the problem is, but I am also not clear on how you are compiling the class that you want to replace BarrelSegmentFinder. What may work best is if we can arrange a shared desktop session so I can see what you are doing.

If you could try installing EVO from http://evo.caltech.edu/ and register for an account we could try setting up a private meeting and I can see exactly what you are doing.

Tony
Re: Class not found [message #1773 is a reply to message #1770] Wed, 01 July 2009 07:54 Go to previous messageGo to next message
bweinert
Messages: 16
Registered: September 2008
Location: University of Rochester
Hi now I'm having another problem, I originally attempted to match the Cell ID's of virtual and real hits to see if the program worked. It now seems better if I could decode the Cell ID's and take a look at each parameter. The problem is it doesn't recognize methods like getX or other method similar to that. Is there another way to decode the cell ID? Sorry for all the questions, and thank you for your help.

-Ben
Re: Class not found [message #1799 is a reply to message #1773] Mon, 13 July 2009 11:49 Go to previous message
bweinert
Messages: 16
Registered: September 2008
Location: University of Rochester
I'm having a problem adding a few methods to Calorimeter hit. I tried adding a few old methods to it but it won't recognize them. These are the errors I get. I'll attach CalorimeterHit. I tried rebuilding lcsim in netbeans. It doesn't seem to recognize the new methods, it just calls the old CalorimeterHit. Is there something I did wrong, or that I can do?

C:\Documents and Settings\sven\LC_software\lcsim\src\org\lcsim\recon\muon\Bar relCalSegmentFinder3.java:276: cannot find symbol
symbol : method getHits()
location: interface java.util.List<org.lcsim.event.CalorimeterHit>
CalorimeterHit jhit = hits.getHits();
^
C:\Documents and Settings\sven\LC_software\lcsim\src\org\lcsim\recon\muon\Bar relCalSegmentFinder3.java:386: cannot find symbol
symbol : method getHits()
location: interface java.util.List<org.lcsim.event.CalorimeterHit>
CalorimeterHit jhit = hits.getHits();
^
C:\Documents and Settings\sven\LC_software\lcsim\src\org\lcsim\recon\muon\Bar relCalSegmentFinder3.java:749: cannot find symbol
symbol : method getHits()
location: interface org.lcsim.event.CalorimeterHit
for (Enumeration eCal = calHits.getHits();
^
C:\Documents and Settings\sven\LC_software\lcsim\src\org\lcsim\recon\muon\Bar relCalSegmentFinder3.java:758: cannot find symbol
symbol : method getTowerID()
location: interface org.lcsim.event.CalorimeterHit
cell.setTowerID(hit.getTowerID());
^
C:\Documents and Settings\sven\LC_software\lcsim\src\org\lcsim\recon\muon\Bar relCalSegmentFinder3.java:759: cannot find symbol
symbol : method getPhiBin()
location: interface org.lcsim.event.CalorimeterHit
int cellPhi = cell.getPhiBin();
^
C:\Documents and Settings\sven\LC_software\lcsim\src\org\lcsim\recon\muon\Bar relCalSegmentFinder3.java:760: cannot find symbol
symbol : method getThetaBin()
location: interface org.lcsim.event.CalorimeterHit
int cellTheta = cell.getThetaBin();
^
C:\Documents and Settings\sven\LC_software\lcsim\src\org\lcsim\recon\muon\Bar relCalSegmentFinder3.java:761: cannot find symbol
symbol : method getLayers()
location: interface org.lcsim.event.CalorimeterHit
int cellLayer = cell.getLayers();

Previous Topic:SLIO file
Next Topic:IDDecoder
Goto Forum:
  

[ PDF ]

Current Time: Wed Feb 19 16:54:16 Pacific Standard Time 2020
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.1.
Copyright ©2001-2010 FUDforum Bulletin Board Software